From 769956d65b185471b2214441731528122e9f0a6c Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Mon, 18 Jul 2022 18:55:58 +0100 Subject: [PATCH] gcc: drop outdated sed for system headers clobber When reviewing https://github.com/NixOS/nixpkgs/pull/181802#issuecomment-1186834504 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. --- pkgs/development/compilers/gcc/builder.sh | 9 --------- 1 file changed, 9 deletions(-) diff --git a/pkgs/development/compilers/gcc/builder.sh b/pkgs/development/compilers/gcc/builder.sh index 9d0514f175901..187bf84068206 100644 --- a/pkgs/development/compilers/gcc/builder.sh +++ b/pkgs/development/compilers/gcc/builder.sh @@ -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: