Merge pull request #313892 from rhelmot/freebsd-minimal3/binutils

binutils: do not build with -static-libgcc on FreeBSD
This commit is contained in:
John Ericson 2024-05-27 10:45:55 -04:00 committed by GitHub
commit 7024402dee
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -170,8 +170,13 @@ stdenv.mkDerivation (finalAttrs: {
# As binutils takes part in the stdenv building, we don't want references
# to the bootstrap-tools libgcc (as uses to happen on arm/mips)
#
# for FreeBSD it's more complicated. With -static-libgcc, configure
# thinks that limits.h does not exist and the build fails for not finding
# LONG_MIN. The configure test itself succeeds but the compiler issues a
# warning about -static-libgcc being unused.
env.NIX_CFLAGS_COMPILE =
if hostPlatform.isDarwin
if (hostPlatform.isDarwin || hostPlatform.isFreeBSD)
then "-Wno-string-plus-int -Wno-deprecated-declarations"
else "-static-libgcc";