Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions pkgs/development/compilers/gcc/common/builder.nix
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,20 @@ originalAttrs:
EXTRA_LDFLAGS_FOR_TARGET="$EXTRA_LDFLAGS"
fi

# We include `-fmacro-prefix-map` in `cc-wrapper` for non‐GCC
# platforms only, but they get picked up and passed down to
# e.g. GFortran calls that complain about the option not
# applying to the language. Hack around it by asking GCC not
# to complain.
#
# TODO: Someone please fix this to do things that make sense.
if [[ $EXTRA_FLAGS_FOR_BUILD == *-fmacro-prefix-map* ]]; then
EXTRA_FLAGS_FOR_BUILD+=" -Wno-complain-wrong-lang"
fi
if [[ $EXTRA_FLAGS_FOR_TARGET == *-fmacro-prefix-map* ]]; then
EXTRA_FLAGS_FOR_TARGET+=" -Wno-complain-wrong-lang"
fi

# CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
# the startfiles.
# FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
Expand Down
Loading