Skip to content

Commit

Permalink
gcc: drop outdated sed for system headers clobber
Browse files Browse the repository at this point in the history
When reviewing NixOS#181802 (comment)
I noticed outdated code that attempted to override /usr/include.

    sed -i \
        -e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \
        gcc/configure

`glibc_header_dir` was removed from `gcc-4.6` and later in
https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=6961669f48aa18168b2d7daa7e2235fbec7cb636
(Dec 2010, "(gcc_cv_ld_eh_frame_hdr): Only check GNU ld for  --eh-frame-hdr.").

Since then gcc got `--with-native-system-header-dir=` which `nixpkgs` uses
for all packaged `gcc` versions.

The change should be a no-op.
  • Loading branch information
trofi committed Jul 18, 2022
1 parent dab3ae9 commit 769956d
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions pkgs/development/compilers/gcc/builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -171,15 +171,6 @@ preConfigure() {
rm -Rf zlib
fi

if test -f "$NIX_CC/nix-support/orig-libc"; then
# Patch the configure script so it finds glibc headers. It's
# important for example in order not to get libssp built,
# because its functionality is in glibc already.
sed -i \
-e "s,glibc_header_dir=/usr/include,glibc_header_dir=$libc_dev/include", \
gcc/configure
fi

if test -n "$crossMingw" -a -n "$crossStageStatic"; then
mkdir -p ../mingw
# --with-build-sysroot expects that:
Expand Down

0 comments on commit 769956d

Please sign in to comment.