Merge pull request #314426 from NixOS/backport-309887-to-release-24.05

This commit is contained in:
Bernardo Meurer 2024-05-24 21:54:43 -04:00 committed by GitHub
commit c172507685
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -51,7 +51,16 @@ stdenv.mkDerivation (finalAttrs: {
]}"
] ++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
"--with-build-cc=${buildPackages.stdenv.cc}/bin/${buildPackages.stdenv.cc.targetPrefix}cc"
];
] ++ (lib.optionals (stdenv.cc.bintools.isLLVM && lib.versionAtLeast stdenv.cc.bintools.version "17") [
# lld17+ passes `--no-undefined-version` by default and makes this a hard
# error; ncurses' `resulting.map` version script references symbols that
# aren't present.
#
# See: https://lists.gnu.org/archive/html/bug-ncurses/2024-05/msg00086.html
#
# For now we allow this with `--undefined-version`:
"LDFLAGS=-Wl,--undefined-version"
]);
# Only the C compiler, and explicitly not C++ compiler needs this flag on solaris:
CFLAGS = lib.optionalString stdenv.isSunOS "-D_XOPEN_SOURCE_EXTENDED";