openjdk{8,11}: fix build with gcc15 (#471069)
This commit is contained in:
@@ -412,10 +412,16 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
if atLeast17 then
|
||||
"-Wno-error"
|
||||
else if atLeast11 then
|
||||
# Workaround for
|
||||
# `cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]`
|
||||
# when building jtreg
|
||||
"-Wformat"
|
||||
lib.concatStringsSep " " (
|
||||
# Workaround for
|
||||
# `cc1plus: error: '-Wformat-security' ignored without '-Wformat' [-Werror=format-security]`
|
||||
# when building jtreg
|
||||
[ "-Wformat" ]
|
||||
++ lib.optionals (stdenv.cc.isGNU && featureVersion == "11") [
|
||||
# Fix build with gcc15
|
||||
"-std=gnu17"
|
||||
]
|
||||
)
|
||||
else
|
||||
lib.concatStringsSep " " (
|
||||
[
|
||||
@@ -436,6 +442,10 @@ stdenv.mkDerivation (finalAttrs: {
|
||||
"-Wno-error=int-conversion"
|
||||
"-Wno-error=incompatible-pointer-types"
|
||||
]
|
||||
++ lib.optionals (stdenv.cc.isGNU && featureVersion == "8") [
|
||||
# Fix build with gcc15
|
||||
"-std=gnu17"
|
||||
]
|
||||
);
|
||||
|
||||
NIX_LDFLAGS = lib.concatStringsSep " " (
|
||||
|
||||
Reference in New Issue
Block a user