#! /bin/sh . $stdenv/setup || exit 1 export PATH=$binutils/bin:$PATH tar xvfj $src || exit 1 # Disable the standard include directories. cd gcc-* || exit 1 cat >> ./gcc/cppdefault.h < $mf.tmp || exit 1 mv $mf.tmp $mf mf=gcc/Makefile sed \ -e "s^X_CFLAGS =\(.*\)^X_CFLAGS = \1 $extraflags^" \ < $mf > $mf.tmp || exit 1 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 || exit 1 mv $mf.tmp $mf # Build and install. make bootstrap || exit 1 make install || exit 1