gcc-4.0: Remove
This commit is contained in:
parent
5200c92aa0
commit
5f6de267f0
@ -1,85 +0,0 @@
|
||||
source $stdenv/setup
|
||||
|
||||
|
||||
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
|
||||
mkdir $NIX_FIXINC_DUMMY
|
||||
|
||||
|
||||
# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
|
||||
# Thing.
|
||||
export CPP="gcc -E"
|
||||
export CXXCPP="gcc -E"
|
||||
|
||||
|
||||
if test "$noSysDirs" = "1"; then
|
||||
|
||||
if test -e $NIX_GCC/nix-support/orig-libc; then
|
||||
|
||||
# Figure out what extra flags to pass to the gcc compilers
|
||||
# being generated to make sure that they use our glibc.
|
||||
extraCFlags="$(cat $NIX_GCC/nix-support/libc-cflags)"
|
||||
extraLDFlags="$(cat $NIX_GCC/nix-support/libc-ldflags) $(cat $NIX_GCC/nix-support/libc-ldflags-before)"
|
||||
|
||||
# Use *real* header files, otherwise a limits.h is generated
|
||||
# that does not include Glibc's limits.h (notably missing
|
||||
# SSIZE_MAX, which breaks the build).
|
||||
export NIX_FIXINC_DUMMY=$(cat $NIX_GCC/nix-support/orig-libc)/include
|
||||
|
||||
else
|
||||
# Hack: support impure environments.
|
||||
extraCFlags="-isystem /usr/include"
|
||||
extraLDFlags="-L/usr/lib64 -L/usr/lib"
|
||||
export NIX_FIXINC_DUMMY=/usr/include
|
||||
fi
|
||||
|
||||
extraCFlags="-g0 $extraCFlags"
|
||||
extraLDFlags="--strip-debug $extraLDFlags"
|
||||
|
||||
export NIX_EXTRA_CFLAGS=$extraCFlags
|
||||
for i in $extraLDFlags; do
|
||||
export NIX_EXTRA_LDFLAGS="$NIX_EXTRA_LDFLAGS -Wl,$i"
|
||||
done
|
||||
|
||||
export CFLAGS=$extraCFlags
|
||||
export CXXFLAGS=$extraCFlags
|
||||
|
||||
makeFlagsArray=( \
|
||||
NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
|
||||
LIMITS_H_TEST=true \
|
||||
X_CFLAGS="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
|
||||
LDFLAGS="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
|
||||
LDFLAGS_FOR_TARGET="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
|
||||
)
|
||||
fi
|
||||
|
||||
|
||||
preConfigure() {
|
||||
# Perform the build in a different directory.
|
||||
mkdir ../build
|
||||
cd ../build
|
||||
configureScript=../$sourceRoot/configure
|
||||
}
|
||||
|
||||
|
||||
postInstall() {
|
||||
# Remove precompiled headers for now. They are very big and
|
||||
# probably not very useful yet.
|
||||
find $out/include -name "*.gch" -exec rm -rf {} \; -prune
|
||||
|
||||
# Remove `fixincl' to prevent a retained dependency on the
|
||||
# previous gcc.
|
||||
rm -rf $out/libexec/gcc/*/*/install-tools
|
||||
|
||||
# Get rid of some "fixed" header files
|
||||
rm -rf $out/lib/gcc/*/*/include/root
|
||||
}
|
||||
|
||||
|
||||
if test -z "$profiledCompiler"; then
|
||||
buildFlags="bootstrap"
|
||||
else
|
||||
buildFlags="profiledbootstrap"
|
||||
fi
|
||||
|
||||
genericBuild
|
@ -1,51 +0,0 @@
|
||||
{ stdenv, fetchurl, noSysDirs
|
||||
, langC ? true, langCC ? true, langFortran ? false
|
||||
, profiledCompiler ? false
|
||||
, gmp ? null , mpfr ? null
|
||||
, texinfo ? null
|
||||
, name ? "gcc"
|
||||
}:
|
||||
|
||||
assert langC;
|
||||
|
||||
with stdenv.lib;
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "${name}-4.0.4";
|
||||
|
||||
builder = ./builder.sh;
|
||||
|
||||
src = fetchurl {
|
||||
url = ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-4.0.4/gcc-4.0.4.tar.bz2;
|
||||
sha256 = "0izwr8d69ld3a1yr8z94s7y7k861wi613mplys2c0bvdr58y1zgk";
|
||||
};
|
||||
|
||||
patches =
|
||||
optional noSysDirs [./no-sys-dirs.patch];
|
||||
|
||||
inherit noSysDirs langC langCC langFortran profiledCompiler;
|
||||
|
||||
buildInputs = [gmp mpfr texinfo];
|
||||
|
||||
configureFlags = "
|
||||
--disable-multilib
|
||||
--disable-libstdcxx-pch
|
||||
--disable-libmudflap
|
||||
--with-system-zlib
|
||||
--enable-languages=${
|
||||
concatStrings (intersperse ","
|
||||
( optional langC "c"
|
||||
++ optional langCC "c++"
|
||||
++ optional langFortran "f95"
|
||||
)
|
||||
)
|
||||
}
|
||||
${if stdenv.isi686 then "--with-arch=i686" else ""}
|
||||
";
|
||||
|
||||
meta = {
|
||||
homepage = "http://gcc.gnu.org/";
|
||||
license = "GPL/LGPL";
|
||||
description = "GNU Compiler Collection, 4.0.x";
|
||||
};
|
||||
}
|
@ -1,228 +0,0 @@
|
||||
diff -rc gcc-4.0.0-orig/gcc/cppdefault.c gcc-4.0.0/gcc/cppdefault.c
|
||||
*** gcc-4.0.0-orig/gcc/cppdefault.c 2004-11-03 04:23:49.000000000 +0100
|
||||
--- gcc-4.0.0/gcc/cppdefault.c 2005-04-22 09:53:28.000000000 +0200
|
||||
***************
|
||||
*** 41,46 ****
|
||||
--- 41,50 ----
|
||||
# undef CROSS_INCLUDE_DIR
|
||||
#endif
|
||||
|
||||
+ #undef LOCAL_INCLUDE_DIR
|
||||
+ #undef SYSTEM_INCLUDE_DIR
|
||||
+ #undef STANDARD_INCLUDE_DIR
|
||||
+
|
||||
const struct default_include cpp_include_defaults[]
|
||||
#ifdef INCLUDE_DEFAULTS
|
||||
= INCLUDE_DEFAULTS;
|
||||
diff -rc gcc-4.0.0-orig/gcc/Makefile.in gcc-4.0.0/gcc/Makefile.in
|
||||
*** gcc-4.0.0-orig/gcc/Makefile.in 2005-04-04 21:45:13.000000000 +0200
|
||||
--- gcc-4.0.0/gcc/Makefile.in 2005-04-22 10:38:50.000000000 +0200
|
||||
***************
|
||||
*** 213,219 ****
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
# These exists to be overridden by the x-* and t-* files, respectively.
|
||||
! X_CFLAGS =
|
||||
T_CFLAGS =
|
||||
|
||||
X_CPPFLAGS =
|
||||
--- 213,219 ----
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
|
||||
# These exists to be overridden by the x-* and t-* files, respectively.
|
||||
! X_CFLAGS = $(NIX_EXTRA_CFLAGS) $(NIX_EXTRA_LDFLAGS)
|
||||
T_CFLAGS =
|
||||
|
||||
X_CPPFLAGS =
|
||||
***************
|
||||
*** 373,379 ****
|
||||
MD5_H = $(srcdir)/../include/md5.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
! NATIVE_SYSTEM_HEADER_DIR = /usr/include
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
--- 373,383 ----
|
||||
MD5_H = $(srcdir)/../include/md5.h
|
||||
|
||||
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
! # Nix: we override NATIVE_SYSTEM_HEADER_DIR in order to prevent
|
||||
! # `fixinc' from fixing header files in /usr/include. However,
|
||||
! # NATIVE_SYSTEM_HEADER_DIR must point to an existing directory, so set
|
||||
! # it to some dummy directory.
|
||||
! NATIVE_SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
|
||||
# Default cross SYSTEM_HEADER_DIR, to be overridden by targets.
|
||||
CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
|
||||
|
||||
***************
|
||||
*** 385,391 ****
|
||||
STMP_FIXINC = @STMP_FIXINC@
|
||||
|
||||
# Test to see whether <limits.h> exists in the system header files.
|
||||
! LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ]
|
||||
|
||||
# Directory for prefix to system directories, for
|
||||
# each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
|
||||
--- 389,395 ----
|
||||
STMP_FIXINC = @STMP_FIXINC@
|
||||
|
||||
# Test to see whether <limits.h> exists in the system header files.
|
||||
! LIMITS_H_TEST = true
|
||||
|
||||
# Directory for prefix to system directories, for
|
||||
# each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
|
||||
***************
|
||||
*** 2677,2683 ****
|
||||
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
|
||||
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
|
||||
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
|
||||
! -DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
|
||||
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
|
||||
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
|
||||
@TARGET_SYSTEM_ROOT_DEFINE@
|
||||
--- 2681,2687 ----
|
||||
-DGPLUSPLUS_INCLUDE_DIR=\"$(gcc_gxx_include_dir)\" \
|
||||
-DGPLUSPLUS_TOOL_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/$(target_noncanonical)\" \
|
||||
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
|
||||
! -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
|
||||
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
|
||||
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
|
||||
@TARGET_SYSTEM_ROOT_DEFINE@
|
||||
Only in gcc-4.0.0/gcc: Makefile.in~
|
||||
diff -rc gcc-4.0.0-orig/libstdc++-v3/include/Makefile.in gcc-4.0.0/libstdc++-v3/include/Makefile.in
|
||||
*** gcc-4.0.0-orig/libstdc++-v3/include/Makefile.in 2005-04-01 06:24:31.000000000 +0200
|
||||
--- gcc-4.0.0/libstdc++-v3/include/Makefile.in 2005-04-22 09:54:27.000000000 +0200
|
||||
***************
|
||||
*** 959,966 ****
|
||||
if [ ! -d "${pch_output_builddir}" ]; then \
|
||||
mkdir -p ${pch_output_builddir}; \
|
||||
fi; \
|
||||
! $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g.gch; \
|
||||
! $(CXX) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g.gch;
|
||||
|
||||
# For robustness sake (in light of junk files or in-source
|
||||
# configuration), copy from the build or source tree to the install
|
||||
--- 959,966 ----
|
||||
if [ ! -d "${pch_output_builddir}" ]; then \
|
||||
mkdir -p ${pch_output_builddir}; \
|
||||
fi; \
|
||||
! $(CXX) $(CFLAGS) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O0 -g -o ${pch_output_builddir}/O0g.gch; \
|
||||
! $(CXX) $(CFLAGS) $(PCHFLAGS) $(AM_CPPFLAGS) ${pch_source} -O2 -g -o ${pch_output_builddir}/O2g.gch;
|
||||
|
||||
# For robustness sake (in light of junk files or in-source
|
||||
# configuration), copy from the build or source tree to the install
|
||||
Only in gcc-4.0.0/libstdc++-v3/include: Makefile.in~
|
||||
Only in gcc-4.0.0/libstdc++-v3/include: Makefile.in.orig
|
||||
Only in gcc-4.0.0/libstdc++-v3/include: Makefile.in.rej
|
||||
diff -rc gcc-4.0.0-orig/ltcf-cxx.sh gcc-4.0.0/ltcf-cxx.sh
|
||||
*** gcc-4.0.0-orig/ltcf-cxx.sh 2004-10-02 18:33:06.000000000 +0200
|
||||
--- gcc-4.0.0/ltcf-cxx.sh 2005-04-22 09:53:28.000000000 +0200
|
||||
***************
|
||||
*** 988,994 ****
|
||||
# the conftest object file.
|
||||
pre_test_object_deps_done=no
|
||||
|
||||
! for p in `eval $output_verbose_link_cmd`; do
|
||||
|
||||
case $p in
|
||||
|
||||
--- 988,994 ----
|
||||
# the conftest object file.
|
||||
pre_test_object_deps_done=no
|
||||
|
||||
! for p in `true`; do
|
||||
|
||||
case $p in
|
||||
|
||||
Only in gcc-4.0.0: ltcf-cxx.sh.orig
|
||||
diff -rc gcc-4.0.0-orig/ltconfig gcc-4.0.0/ltconfig
|
||||
*** gcc-4.0.0-orig/ltconfig 2004-10-02 18:33:06.000000000 +0200
|
||||
--- gcc-4.0.0/ltconfig 2005-04-22 13:33:33.000000000 +0200
|
||||
***************
|
||||
*** 2321,2326 ****
|
||||
--- 2321,2331 ----
|
||||
# A language-specific compiler.
|
||||
CC=$CC
|
||||
|
||||
+ # Ugly hack to get libmudflap (and possibly other libraries) to build.
|
||||
+ # Libtool filters out \`-B' flags when linking (why?), so the \`-B' flag
|
||||
+ # to Glibc gets lost. Here we forcibly add it to any invocation.
|
||||
+ CC="\$CC $NIX_EXTRA_LDFLAGS"
|
||||
+
|
||||
# Is the compiler the GNU C compiler?
|
||||
with_gcc=$with_gcc
|
||||
|
||||
Only in gcc-4.0.0: ltconfig~
|
||||
diff -rc gcc-4.0.0-orig/Makefile.in gcc-4.0.0/Makefile.in
|
||||
*** gcc-4.0.0-orig/Makefile.in 2005-04-21 09:04:10.000000000 +0200
|
||||
--- gcc-4.0.0/Makefile.in 2005-04-22 09:53:28.000000000 +0200
|
||||
***************
|
||||
*** 336,342 ****
|
||||
NM = @NM@
|
||||
|
||||
LD = @LD@
|
||||
! LDFLAGS =
|
||||
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
--- 336,342 ----
|
||||
NM = @NM@
|
||||
|
||||
LD = @LD@
|
||||
! LDFLAGS = $(NIX_EXTRA_LDFLAGS)
|
||||
|
||||
RANLIB = @RANLIB@
|
||||
|
||||
***************
|
||||
*** 387,393 ****
|
||||
# CFLAGS will be just -g. We want to ensure that TARGET libraries
|
||||
# (which we know are built with gcc) are built with optimizations so
|
||||
# prepend -O2 when setting CFLAGS_FOR_TARGET.
|
||||
! CFLAGS_FOR_TARGET = -O2 $(CFLAGS)
|
||||
# If GCC_FOR_TARGET is not overriden on the command line, then this
|
||||
# variable is passed down to the gcc Makefile, where it is used to
|
||||
# build libgcc2.a. We define it here so that it can itself be
|
||||
--- 387,393 ----
|
||||
# CFLAGS will be just -g. We want to ensure that TARGET libraries
|
||||
# (which we know are built with gcc) are built with optimizations so
|
||||
# prepend -O2 when setting CFLAGS_FOR_TARGET.
|
||||
! CFLAGS_FOR_TARGET = -O2 $(CFLAGS) $(NIX_EXTRA_CFLAGS)
|
||||
# If GCC_FOR_TARGET is not overriden on the command line, then this
|
||||
# variable is passed down to the gcc Makefile, where it is used to
|
||||
# build libgcc2.a. We define it here so that it can itself be
|
||||
***************
|
||||
*** 400,406 ****
|
||||
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
|
||||
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
|
||||
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
|
||||
--- 400,406 ----
|
||||
RAW_CXX_FOR_TARGET = @RAW_CXX_FOR_TARGET@
|
||||
CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE = @RAW_CXX_FOR_TARGET_FOR_RECURSIVE_MAKE@
|
||||
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(NIX_EXTRA_CFLAGS)
|
||||
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
|
||||
|
||||
DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@
|
||||
***************
|
||||
*** 434,440 ****
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
! LDFLAGS_FOR_TARGET =
|
||||
|
||||
NM_FOR_TARGET=@NM_FOR_TARGET@
|
||||
CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
|
||||
--- 434,440 ----
|
||||
fi; \
|
||||
fi`
|
||||
|
||||
! LDFLAGS_FOR_TARGET = $(NIX_EXTRA_LDFLAGS)
|
||||
|
||||
NM_FOR_TARGET=@NM_FOR_TARGET@
|
||||
CONFIGURED_NM_FOR_TARGET=@CONFIGURED_NM_FOR_TARGET@
|
||||
Only in gcc-4.0.0: Makefile.in.orig
|
@ -1934,12 +1934,6 @@ let
|
||||
# expects a single digit after the dot. As a workaround, we feed
|
||||
# GCC with Texinfo 4.9. Stupid bug, hackish workaround.
|
||||
|
||||
gcc40 = wrapGCC (makeOverridable (import ../development/compilers/gcc/4.0) {
|
||||
inherit fetchurl stdenv noSysDirs;
|
||||
texinfo = texinfo49;
|
||||
profiledCompiler = true;
|
||||
});
|
||||
|
||||
gcc41 = wrapGCC (makeOverridable (import ../development/compilers/gcc/4.1) {
|
||||
inherit fetchurl noSysDirs gmp mpfr;
|
||||
stdenv = overrideGCC stdenv gcc42;
|
||||
@ -2176,12 +2170,6 @@ let
|
||||
|
||||
gfortran = gfortran46;
|
||||
|
||||
gfortran40 = wrapGCC (gcc40.gcc.override {
|
||||
langFortran = true;
|
||||
langCC = false;
|
||||
inherit gmp mpfr;
|
||||
});
|
||||
|
||||
gfortran41 = wrapGCC (gcc41.gcc.override {
|
||||
name = "gfortran";
|
||||
langFortran = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user