* Renamed pkgs-ng to pkgs.

svn path=/nixpkgs/trunk/; revision=502
This commit is contained in:
Eelco Dolstra
2003-11-14 09:59:13 +00:00
parent 6b2bb22474
commit 48c3faca51
141 changed files with 0 additions and 0 deletions
+56
View File
@@ -0,0 +1,56 @@
#! /bin/sh
buildinputs="$binutils"
. $stdenv/setup || exit 1
tar xvfj $src || exit 1
if test "$noSysDirs" == "1"; then
# Disable the standard include directories.
cd gcc-* || exit 1
cat >> ./gcc/cppdefault.h <<EOF
#undef LOCAL_INCLUDE_DIR
#undef SYSTEM_INCLUDE_DIR
#undef STANDARD_INCLUDE_DIR
EOF
cd .. || exit 1
fi
# Configure.
mkdir build || exit 1
cd build || exit 1
../gcc-*/configure --prefix=$out --enable-languages=c,c++ || exit 1
if test "$noSysDirs" == "1"; then
# Patch some of the makefiles to force linking against our own glibc.
extraflags="-Wl,-s $NIX_CFLAGS_COMPILE $NIX_CFLAGS_LINK"
for i in $NIX_LDFLAGS; do
extraflags="$extraflags -Wl,$i"
done
mf=Makefile
sed \
-e "s^FLAGS_FOR_TARGET =\(.*\)^FLAGS_FOR_TARGET = \1 $extraflags^" \
< $mf > $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
fi
# Build and install.
make bootstrap || exit 1
make install || exit 1
find $out -name "*.a" -exec strip -S {} \; || exit 1
@@ -0,0 +1,12 @@
{stdenv, fetchurl, binutils}: derivation {
name = "gcc-3.3.2";
system = stdenv.system;
builder = ./builder.sh;
src = fetchurl {
url = ftp://ftp.nluug.nl/pub/gnu/gcc/gcc-3.3.2/gcc-3.3.2.tar.bz2;
md5 = "65999f654102f5438ac8562d13a6eced";
};
stdenv = stdenv;
binutils = binutils;
noSysDirs = stdenv.noSysDirs;
}