#! /bin/sh -e buildinputs="$binutils" . $stdenv/setup tar xvfj $src if test "$noSysDirs" = "1"; then # Disable the standard include directories. cd gcc-* cat >> ./gcc/cppdefault.h < $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-disabled^" \ < $mf > $mf.tmp mv $mf.tmp $mf fi # Build and install. make bootstrap make install find $out -name "*.a" -exec strip -S {} \;