source $stdenv/setup FIXINC_DUMMY=$NIX_BUILD_TOP/dummy mkdir $FIXINC_DUMMY preConfigure() { if test "$noSysDirs" = "1"; then # Disable the standard include directories. cat >> ./gcc/cppdefault.h < $hook export NIX_LD_WRAPPER_START_HOOK=$hook fi mf=Makefile sed \ -e "s^FLAGS_FOR_TARGET =\(.*\)^FLAGS_FOR_TARGET = \1 $extraFlags^" \ < $mf > $mf.tmp mv $mf.tmp $mf mf=gcc/Makefile sed \ -e "s^X_CFLAGS =\(.*\)^X_CFLAGS = \1 $extraFlags^" \ < $mf > $mf.tmp mv $mf.tmp $mf # Patch gcc/Makefile to prevent fixinc.sh from "fixing" system # header files from /usr/include. mf=gcc/Makefile sed \ -e "s^NATIVE_SYSTEM_HEADER_DIR =\(.*\)^NATIVE_SYSTEM_HEADER_DIR = $FIXINC_DUMMY^" \ < $mf > $mf.tmp mv $mf.tmp $mf fi } postConfigure=postConfigure makeFlags="bootstrap" genericBuild