Merge remote-tracking branch 'origin/gcc-5' into staging

Still some breakage but no blockers:

http://hydra.nixos.org/eval/1242130?filter=x86_64-linux&compare=1237852&full=#tabs-now-fail
This commit is contained in:
Eelco Dolstra 2016-03-11 16:02:02 +01:00
commit dd53c65dcc
39 changed files with 60 additions and 1848 deletions

View File

@ -69,7 +69,7 @@ stdenv.mkDerivation rec {
"--enable-optimize" "--enable-strip" ])
++ [
"--disable-javaxpcom"
"--enable-stdcxx-compat" # Avoid dependency on libstdc++ 4.7
#"--enable-stdcxx-compat" # Avoid dependency on libstdc++ 4.7
]
++ stdenv.lib.optional enableOfficialBranding "--enable-official-branding";
in ''

View File

@ -12,7 +12,7 @@ stdenv.mkDerivation rec {
doCheck = true;
NIX_CFLAGS_COMPILE = if stdenv.isDarwin then "-std=gnu99" else null;
NIX_CFLAGS_COMPILE = [ "-std=c99" ];
meta = {
homepage = http://www.gnu.org/software/rcs/;

View File

@ -0,0 +1,27 @@
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fb0ed8c85dd15fb18a902b22a7555ba4f7cf01cb
Patch created by: Erik Zeek
See also: https://bugs.gentoo.org/show_bug.cgi?id=567022
--- a/CMakeLists.txt
+++ a/CMakeLists.txt
@@ -166,7 +166,7 @@ add_sip_python_module(PyKDE4.kdeui sip/kdeui/kdeuimod.sip ${KDE4_KDEUI_LIBS} ${Q
file(GLOB kio_files_sip sip/kio/*.sip)
set(SIP_EXTRA_FILES_DEPEND ${kio_files_sip})
-add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS})
+add_sip_python_module(PyKDE4.kio sip/kio/kiomod.sip ${KDE4_SOLID_LIBS} ${KDE4_KIO_LIBS} ${KDE4_KFILE_LIBS})
file(GLOB kutils_files_sip sip/kutils/*.sip)
set(SIP_EXTRA_FILES_DEPEND ${kutils_files_sip})
@@ -190,7 +190,7 @@ add_sip_python_module(PyKDE4.knewstuff sip/knewstuff/knewstuffmod.sip ${KDE4_KNE
file(GLOB dnssd_files_sip sip/dnssd/*.sip)
set(SIP_EXTRA_FILES_DEPEND ${dnssd_files_sip})
-add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY})
+add_sip_python_module(PyKDE4.dnssd sip/dnssd/dnssdmod.sip ${KDE4_KDNSSD_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY})
file(GLOB phonon_files_sip sip/phonon/*.sip)
set(SIP_EXTRA_FILES_DEPEND ${phonon_files_sip})

View File

@ -5,6 +5,8 @@ let pydir = "lib/python${python.majorVersion}"; in
kde {
patches = [ ./pykde4-gcc-5.patch ];
# todo: polkit isn't found by the build system
buildInputs = [

View File

@ -1,144 +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"
if test "$noSysDirs" = "1"; then
if test -e $NIX_CC/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_CC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/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_CC/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 -I$gmp/include -I$mpfr/include $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
if test -n "$targetConfig"; then
if test -z "$crossStageStatic"; then
extraXCFlags="-B${libcCross}/lib -idirafter ${libcCross}/include"
extraXLDFlags="-L${libcCross}/lib"
export NIX_EXTRA_CFLAGS_TARGET=$extraXCFlags
for i in $extraXLDFlags; do
export NIX_EXTRA_LDFLAGS_TARGET="$NIX_EXTRA_LDFLAGS_TARGET -Wl,$i"
done
fi
makeFlagsArray=( \
"${makeFlagsArray[@]}" \
NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
CFLAGS_FOR_TARGET="$NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET" \
LDFLAGS_FOR_TARGET="$NIX_EXTRA_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET" \
)
else
export NIX_EXTRA_CFLAGS_TARGET=$NIX_EXTRA_CFLAGS
export NIX_EXTRA_LDFLAGS_TARGET=$NIX_EXTRA_LDFLAGS
makeFlagsArray=( \
"${makeFlagsArray[@]}" \
NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
CFLAGS_FOR_BUILD="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
CFLAGS_FOR_TARGET="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
LDFLAGS_FOR_BUILD="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
LDFLAGS_FOR_TARGET="$NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS" \
)
fi
if test -n "$targetConfig" -a "$crossStageStatic" == 1; then
# We don't want the gcc build to assume there will be a libc providing
# limits.h in this stagae
makeFlagsArray=( \
"${makeFlagsArray[@]}" \
LIMITS_H_TEST=false \
)
else
makeFlagsArray=( \
"${makeFlagsArray[@]}" \
LIMITS_H_TEST=true \
)
fi
fi
if test -n "$targetConfig"; then
# The host strip will destroy everything in the target binaries otherwise
dontStrip=1
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
rm -rf $out/lib/gcc/*/*/install-tools
# Get rid of some "fixed" header files
rm -rf $out/lib/gcc/*/*/include/root
# Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
for i in $out/bin/*-gcc*; do
if cmp -s $out/bin/gcc $i; then
ln -sfn gcc $i
fi
done
for i in $out/bin/*-c++* $out/bin/*-g++*; do
if cmp -s $out/bin/g++ $i; then
ln -sfn g++ $i
fi
done
eval "$postInstallGhdl"
}
if test -z "$targetConfig"; then
if test -z "$profiledCompiler"; then
buildFlags="bootstrap $buildFlags"
else
buildFlags="profiledbootstrap $buildFlags"
fi
else
:
# buildFlags="all-gcc all-target-libgcc $buildFlags"
# installTargets="install-gcc install-target-libgcc"
fi
genericBuild

View File

@ -1,184 +0,0 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langFortran ? false, langTreelang ? false
, langJava ? false
, langVhdl ? false
, profiledCompiler ? false
, staticCompiler ? false
, enableShared ? true
, texinfo ? null
, gmp, mpfr
, bison ? null, flex ? null
, zlib ? null, boehmgc ? null
, enableMultilib ? false
, name ? "gcc"
, cross ? null
, binutilsCross ? null
, libcCross ? null
, crossStageStatic ? true
, gnat ? null
}:
assert langTreelang -> bison != null && flex != null;
assert cross != null -> profiledCompiler == false && enableMultilib == true;
assert (cross != null && crossStageStatic) -> (langCC == false && langFortran
== false && langTreelang == false);
assert langVhdl -> gnat != null;
with stdenv.lib;
let
version = "4.3.6";
crossConfigureFlags =
"--target=${cross.config}" +
(if crossStageStatic then
" --disable-libssp --disable-nls" +
" --without-headers" +
" --disable-threads " +
" --disable-libmudflap " +
" --disable-libgomp " +
" --disable-shared"
else
" --with-headers=${libcCross}/include" +
" --enable-__cxa_atexit" +
" --enable-long-long" +
" --enable-threads=posix" +
" --enable-nls"
);
stageNameAddon = if crossStageStatic then "-stage-static" else
"-stage-final";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
in
stdenv.mkDerivation ({
name = "${name}-${version}" + crossNameAddon;
builder = ./builder.sh;
src =
optional /*langC*/ true (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
sha256 = "0ygrfw3hgp48hkqipbl9lw38f27npigc2sm6f01g9iswpq1igbw6";
}) ++
optional langCC (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
sha256 = "105xz3991b57zx3146xwlpchdb2sjmlknclvi1iac2gawm4mhxhf";
}) ++
optional langFortran (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2";
sha256 = "12bqvf53hvhrwjnh101vn9frb5g8cr98cra4f11dzhzs4ppydpi1";
}) ++
optional langJava (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2";
sha256 = "03w6jln9gmdv149s774rlw4rzi2zhbqna54r86cd6mql8flmy7fs";
});
patches =
[ ./pass-cxxcpp.patch ./libmudflap-cpp.patch ./siginfo_t_fix.patch ]
++ optional noSysDirs ./no-sys-dirs.patch
++ optional (noSysDirs && langFortran) ./no-sys-dirs-fortran.patch
++ optional langJava ./java-jvgenmain-link.patch
++ optional langVhdl ./ghdl-ortho-cflags.patch
++ optional langVhdl ./ghdl-runtime-o2.patch;
inherit noSysDirs profiledCompiler staticCompiler crossStageStatic
binutilsCross libcCross;
targetConfig = if cross != null then cross.config else null;
buildInputs = [texinfo gmp mpfr]
++ (optionals langTreelang [bison flex])
++ (optional (zlib != null) zlib)
++ (optional (boehmgc != null) boehmgc)
++ (optionals (cross != null) [binutilsCross])
++ (optionals langVhdl [gnat])
;
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
--disable-libstdcxx-pch
--with-system-zlib
--enable-languages=${
concatStrings (intersperse ","
( optional langC "c"
++ optional langCC "c++"
++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langTreelang "treelang"
++ optional langVhdl "vhdl"
)
)
}
${if stdenv.isi686 then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
";
#Above I added a hack on making the build different than the host.
# Needed for the cross compilation to work
AR = "ar";
LD = "ld";
CC = "gcc";
NIX_EXTRA_LDFLAGS = if staticCompiler then "-static" else "";
inherit gmp mpfr;
passthru = { inherit langC langCC langFortran langVhdl langTreelang
enableMultilib; };
# ghdl does not build fine with parallel building
enableParallelBuilding = !langVhdl;
meta = {
homepage = "http://gcc.gnu.org/";
license = "GPL/LGPL";
description = "GNU Compiler Collection, 4.3.x";
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
} // (if langJava then {
postConfigure = ''
make configure-gcc
sed -i gcc/Makefile -e 's@^CFLAGS = .*@& -I${zlib}/include@ ; s@^LDFLAGS = .*@& -L${zlib}/lib@'
sed -i gcc/Makefile -e 's@^CFLAGS = .*@& -I${boehmgc}/include@ ; s@^LDFLAGS = .*@& -L${boehmgc}/lib -lgc@'
'';
} else {})
// (if langVhdl then rec {
name = "ghdl-0.29";
ghdlSrc = fetchurl {
url = "http://ghdl.free.fr/ghdl-0.29.tar.bz2";
sha256 = "15mlinr1lwljwll9ampzcfcrk9bk0qpdks1kxlvb70xf9zhh2jva";
};
# Ghdl has some timestamps checks, storing file timestamps in '.cf' files.
# As we will change the timestamps to 1970-01-01 00:00:01, we also set the
# content of that .cf to that value. This way ghdl does not complain on
# the installed object files from the basic libraries (ieee, ...)
postInstallGhdl = ''
pushd $out
find . -name "*.cf" -exec \
sed 's/[0-9]*\.000" /19700101000001.000" /g' -i {} \;
popd
'';
postUnpack = ''
tar xvf ${ghdlSrc}
mv ghdl-*/vhdl gcc*/gcc
rm -Rf ghdl-*
'';
passthru.isGNU = true;
meta = {
homepage = "http://ghdl.free.fr/";
license = stdenv.lib.licenses.gpl2Plus;
description = "Complete VHDL simulator, using the GCC technology";
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
} else {}))

View File

@ -1,36 +0,0 @@
diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
index 8f481df..681ac59 100644
--- a/gcc/vhdl/Make-lang.in
+++ b/gcc/vhdl/Make-lang.in
@@ -96,7 +96,7 @@ AGCC_GCCOBJ_DIR=../
AGCC_INC_FLAGS=-I$(AGCC_GCCOBJ_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/include \
-I$(AGCC_GCCSRC_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/gcc/config \
-I$(AGCC_GCCSRC_DIR)/libcpp/include
-AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS)
+AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS) $(CFLAGS)
AGCC_LOCAL_OBJS=ortho-lang.o
@@ -140,7 +140,7 @@ ghdl$(exeext): force
# Ghdl libraries.
ghdllib: ghdl$(exeext) $(GCC_PASSES) force
- $(MAKE_IN_VHDL) GRT_FLAGS="-O -g" ghdllib
+ $(MAKE_IN_VHDL) GRT_FLAGS="-O -g $(CFLAGS)" ghdllib
# Build hooks:
diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
index d754c6c..07abc4a 100644
--- a/gcc/vhdl/Makefile.in
+++ b/gcc/vhdl/Makefile.in
@@ -80,7 +80,8 @@ T_CPPFLAGS =
X_ADAFLAGS =
T_ADAFLAGS =
-ADAC = $(CC)
+# Never use the bootstrapped compiler, as it may not be built for ada
+ADAC = gcc
ECHO = echo
CHMOD = chmod

View File

@ -1,13 +0,0 @@
diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
index b8d2ed0..0e8bd55 100644
--- a/gcc/vhdl/Makefile.in
+++ b/gcc/vhdl/Makefile.in
@@ -682,7 +682,7 @@ install-ghdllib: ghdllib grt.lst $(STD93_SRCS) $(STD87_SRCS) \
PDIR=`pwd` && cd $(DESTDIR)$(VHDL_LIB_DIR) && \
$(MAKE) -f $$PDIR/Makefile REL_DIR=../../.. \
LIBSRC_DIR="src" LIB93_DIR=lib/v93 LIB87_DIR=lib/v87 \
- ANALYZE="$$PDIR/../ghdl -a --GHDL1=$$PDIR/../ghdl1 --ieee=none" \
+ ANALYZE="$$PDIR/../ghdl -a --GHDL1=$$PDIR/../ghdl1 --ieee=none -Wc,-O2" \
std.v93 std.v87 ieee.v93 ieee.v87 synopsys.v93 synopsys.v87 mentor.v93
# Copy std_standard (this is done after libraries, since they remove dirs).
$(INSTALL_DATA) std87_standard.o \

View File

@ -1,17 +0,0 @@
The `jvgenmain' executable must be linked against `vec.o', among others,
since it uses its vector API.
--- gcc-4.3.3/gcc/java/Make-lang.in 2008-12-05 00:00:19.000000000 +0100
+++ gcc-4.3.3/gcc/java/Make-lang.in 2009-07-03 16:11:41.000000000 +0200
@@ -109,9 +109,9 @@ jcf-dump$(exeext): $(JCFDUMP_OBJS) $(LIB
$(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JCFDUMP_OBJS) \
$(CPPLIBS) $(ZLIB) $(LDEXP_LIB) $(LIBS)
-jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS)
+jvgenmain$(exeext): $(JVGENMAIN_OBJS) $(LIBDEPS) $(BUILD_RTL)
rm -f $@
- $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(LIBS)
+ $(CC) $(ALL_CFLAGS) $(LDFLAGS) -o $@ $(JVGENMAIN_OBJS) $(BUILD_RTL) $(LIBS)
#
# Build hooks:

View File

@ -1,12 +0,0 @@
diff --git a/Makefile.in b/Makefile.in
index d24c1af..b86e522 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -230,6 +229,7 @@ RAW_CXX_TARGET_EXPORTS = \
NORMAL_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CXX="$(CXX_FOR_TARGET)"; export CXX;
# Where to find GMP

View File

@ -1,15 +0,0 @@
diff -ru gcc-4.3.1-orig/libgfortran/configure gcc-4.3.1/libgfortran/configure
--- gcc-4.3.1-orig/libgfortran/configure 2008-06-06 16:49:11.000000000 +0200
+++ gcc-4.3.1/libgfortran/configure 2008-06-27 08:25:08.000000000 +0200
@@ -35405,6 +35405,11 @@
# A language specific compiler.
CC=$lt_compiler
+# 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_CFLAGS $NIX_EXTRA_LDFLAGS"
+
# Is the compiler the GNU compiler?
with_gcc=$GCC

View File

@ -1,132 +0,0 @@
diff -ru gcc-4.3.1-orig/gcc/cppdefault.c gcc-4.3.1/gcc/cppdefault.c
--- gcc-4.3.1-orig/gcc/cppdefault.c 2007-07-26 10:37:01.000000000 +0200
+++ gcc-4.3.1/gcc/cppdefault.c 2008-06-25 17:48:23.000000000 +0200
@@ -41,6 +41,10 @@
# 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 -ru gcc-4.3.1-orig/gcc/gcc.c gcc-4.3.1/gcc/gcc.c
--- gcc-4.3.1-orig/gcc/gcc.c 2008-03-02 23:55:19.000000000 +0100
+++ gcc-4.3.1/gcc/gcc.c 2008-06-25 17:52:53.000000000 +0200
@@ -1478,10 +1478,10 @@
/* Default prefixes to attach to command names. */
#ifndef STANDARD_STARTFILE_PREFIX_1
-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+#define STANDARD_STARTFILE_PREFIX_1 ""
#endif
#ifndef STANDARD_STARTFILE_PREFIX_2
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
+#define STANDARD_STARTFILE_PREFIX_2 ""
#endif
#ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
@@ -1515,8 +1515,8 @@
/* For native compilers, these are well-known paths containing
components that may be provided by the system. For cross
compilers, these paths are not used. */
-static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/";
-static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/";
+static const char *const standard_exec_prefix_1 = "/no-such-path/";
+static const char *const standard_exec_prefix_2 = "/no-such-path/";
static const char *md_exec_prefix = MD_EXEC_PREFIX;
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
diff -ru gcc-4.3.1-orig/gcc/Makefile.in gcc-4.3.1/gcc/Makefile.in
--- gcc-4.3.1-orig/gcc/Makefile.in 2008-05-11 20:54:15.000000000 +0200
+++ gcc-4.3.1/gcc/Makefile.in 2008-06-25 17:48:23.000000000 +0200
@@ -378,7 +378,11 @@
MD5_H = $(srcdir)/../include/md5.h
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
-NATIVE_SYSTEM_HEADER_DIR = /usr/include
+# 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@
@@ -3277,7 +3281,7 @@
-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)\" \
+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
-DPREFIX=\"$(prefix)/\" \
diff -ru gcc-4.3.1-orig/libgomp/configure gcc-4.3.1/libgomp/configure
--- gcc-4.3.1-orig/libgomp/configure 2008-01-24 17:23:13.000000000 +0100
+++ gcc-4.3.1/libgomp/configure 2008-06-26 11:23:49.000000000 +0200
@@ -21493,6 +21493,11 @@
# A language specific compiler.
CC=$lt_compiler
+# 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_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET"
+
# Is the compiler the GNU compiler?
with_gcc=$GCC
Only in gcc-4.3.1/libgomp: configure~
diff -ru gcc-4.3.1-orig/libmudflap/configure gcc-4.3.1/libmudflap/configure
--- gcc-4.3.1-orig/libmudflap/configure 2008-01-24 17:30:08.000000000 +0100
+++ gcc-4.3.1/libmudflap/configure 2008-06-26 11:23:11.000000000 +0200
@@ -14229,6 +14229,11 @@
# A language specific compiler.
CC=$lt_compiler
+# 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_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET"
+
# Is the compiler the GNU compiler?
with_gcc=$GCC
Only in gcc-4.3.1/libmudflap: configure~
diff -ru gcc-4.3.1-orig/libssp/configure gcc-4.3.1/libssp/configure
--- gcc-4.3.1-orig/libssp/configure 2008-01-24 17:33:29.000000000 +0100
+++ gcc-4.3.1/libssp/configure 2008-06-26 11:23:25.000000000 +0200
@@ -12142,6 +12142,11 @@
# A language specific compiler.
CC=$lt_compiler
+# 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_CFLAGS_TARGET $NIX_EXTRA_LDFLAGS_TARGET"
+
# Is the compiler the GNU compiler?
with_gcc=$GCC
Only in gcc-4.3.1/libssp: configure~
diff -ru gcc-4.3.1-orig/Makefile.in gcc-4.3.1/Makefile.in
--- gcc-4.3.1-orig/Makefile.in 2007-12-13 10:30:49.000000000 +0100
+++ gcc-4.3.1/Makefile.in 2008-06-25 17:48:23.000000000 +0200
@@ -405,6 +405,14 @@
@host_makefile_frag@
###
+CFLAGS += $(NIX_EXTRA_CFLAGS)
+CPPFLAGS_FOR_TARGET += $(NIX_EXTRA_CFLAGS_TARGET)
+CXXFLAGS += $(NIX_EXTRA_CFLAGS)
+LDFLAGS += $(NIX_EXTRA_LDFLAGS)
+LDFLAGS_FOR_TARGET += $(NIX_EXTRA_LDFLAGS_TARGET)
+BOOT_CFLAGS += $(NIX_EXTRA_CFLAGS)
+BOOT_LDFLAGS += $(NIX_EXTRA_LDFLAGS)
+
# This is the list of directories that may be needed in RPATH_ENVVAR
# so that prorgams built for the target machine work.
TARGET_LIB_PATH = $(TARGET_LIB_PATH_libstdc++-v3)$(TARGET_LIB_PATH_libmudflap)$(TARGET_LIB_PATH_libssp)$(TARGET_LIB_PATH_libgomp)$(HOST_LIB_PATH_gcc)

View File

@ -1,21 +0,0 @@
diff -rc gcc-orig/Makefile.in gcc-4.1.1/Makefile.in
*** gcc-orig/Makefile.in Wed Jun 21 13:40:23 2006
--- gcc-4.1.1/Makefile.in Wed Jun 21 14:19:44 2006
***************
*** 213,219 ****
RAW_CXX_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
! CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
NORMAL_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
--- 213,220 ----
RAW_CXX_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
! CXX="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD)"; export CXX; \
! CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD) -E"; export CXXCPP;
NORMAL_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \

View File

@ -1,174 +0,0 @@
https://bugs.gentoo.org/424970
fix from upstream for building with newer glibc versions
From f0cdca2bf2230005025e13e7354fedb612933c96 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 20 Apr 2012 08:14:00 +0000
Subject: [PATCH] struct siginfo vs. siginfo_t
Backport from trunk (but apply to gcc/):
2012-04-20 Thomas Schwinge <thomas@codesourcery.com>
gcc/
* config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
siginfo_t instead of struct siginfo.
* config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
* config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
* config/ia64/linux-unwind.h (ia64_fallback_frame_state)
(ia64_handle_unwabi): Likewise.
* config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
* config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
* config/sh/linux-unwind.h (shmedia_fallback_frame_state)
(sh_fallback_frame_state): Likewise.
* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@186613 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 20 ++++++++++++++++++++
gcc/config/alpha/linux-unwind.h | 4 ++--
gcc/config/bfin/linux-unwind.h | 6 +++---
gcc/config/i386/linux-unwind.h | 6 +++---
gcc/config/ia64/linux-unwind.h | 6 +++---
gcc/config/mips/linux-unwind.h | 5 +++--
gcc/config/pa/linux-unwind.h | 4 ++--
gcc/config/sh/linux-unwind.h | 9 +++++----
gcc/config/xtensa/linux-unwind.h | 4 ++--
9 files changed, 43 insertions(+), 21 deletions(-)
diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h
index 4c811dc..8c04b3b 100644
--- a/gcc/config/alpha/linux-unwind.h
+++ b/gcc/config/alpha/linux-unwind.h
@@ -49,7 +49,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
{
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
diff --git a/gcc/config/bfin/linux-unwind.h b/gcc/config/bfin/linux-unwind.h
index 88c8285..15bb2f1 100644
--- a/gcc/config/bfin/linux-unwind.h
+++ b/gcc/config/bfin/linux-unwind.h
@@ -48,10 +48,10 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
int sig;
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
char retcode[8];
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h
index 36ee370..fe0ea3e 100644
--- a/gcc/config/i386/linux-unwind.h
+++ b/gcc/config/i386/linux-unwind.h
@@ -133,9 +133,9 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
int sig;
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/gcc/config/ia64/linux-unwind.h b/gcc/config/ia64/linux-unwind.h
index 93f762d..da31259 100644
--- a/gcc/config/ia64/linux-unwind.h
+++ b/gcc/config/ia64/linux-unwind.h
@@ -47,7 +47,7 @@ ia64_fallback_frame_state (struct _Unwind_Context *context,
struct sigframe {
char scratch[16];
unsigned long sig_number;
- struct siginfo *info;
+ siginfo_t *info;
struct sigcontext *sc;
} *frame_ = (struct sigframe *)context->psp;
struct sigcontext *sc = frame_->sc;
@@ -137,7 +137,7 @@ ia64_handle_unwabi (struct _Unwind_Context *context, _Unwind_FrameState *fs)
struct sigframe {
char scratch[16];
unsigned long sig_number;
- struct siginfo *info;
+ siginfo_t *info;
struct sigcontext *sc;
} *frame = (struct sigframe *)context->psp;
struct sigcontext *sc = frame->sc;
diff --git a/gcc/config/mips/linux-unwind.h b/gcc/config/mips/linux-unwind.h
index 02f7cd5..094ff58 100644
--- a/gcc/config/mips/linux-unwind.h
+++ b/gcc/config/mips/linux-unwind.h
@@ -75,7 +76,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe {
u_int32_t ass[4]; /* Argument save space for o32. */
u_int32_t trampoline[2];
- struct siginfo info;
+ siginfo_t info;
_sig_ucontext_t uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
diff --git a/gcc/config/pa/linux-unwind.h b/gcc/config/pa/linux-unwind.h
index a0560e9..38b4eda 100644
--- a/gcc/config/pa/linux-unwind.h
+++ b/gcc/config/pa/linux-unwind.h
@@ -63,7 +63,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
int i;
struct sigcontext *sc;
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *frame;
diff --git a/gcc/config/sh/linux-unwind.h b/gcc/config/sh/linux-unwind.h
index 94ed95d..5a78e31 100644
--- a/gcc/config/sh/linux-unwind.h
+++ b/gcc/config/sh/linux-unwind.h
@@ -80,9 +81,9 @@ shmedia_fallback_frame_state (struct _Unwind_Context *context,
&& (*(unsigned long *) (pc+11) == 0x6ff0fff0))
{
struct rt_sigframe {
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
@@ -179,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
&& (*(unsigned short *) (pc+14) == 0x00ad))))
{
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/gcc/config/xtensa/linux-unwind.h b/gcc/config/xtensa/linux-unwind.h
index 32e9349..2456497 100644
--- a/gcc/config/xtensa/linux-unwind.h
+++ b/gcc/config/xtensa/linux-unwind.h
@@ -62,7 +62,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
struct sigcontext *sc;
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_;
--
1.7.9.7

View File

@ -1,200 +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"
if test "$staticCompiler" = "1"; then
EXTRA_LDFLAGS="-static"
else
EXTRA_LDFLAGS=""
fi
if test "$noSysDirs" = "1"; then
if test -e $NIX_CC/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.
extraFlags="$(cat $NIX_CC/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC/nix-support/libc-ldflags) $(cat $NIX_CC/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_CC/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_CC/nix-support/orig-libc)/lib"
else
# Hack: support impure environments.
extraFlags="-isystem /usr/include"
extraLDFlags="-L/usr/lib64 -L/usr/lib"
glibc_libdir="/usr/lib"
export NIX_FIXINC_DUMMY=/usr/include
fi
extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY $extraFlags"
extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
EXTRA_FLAGS="$extraFlags"
for i in $extraLDFlags; do
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,$i"
done
if test -n "$targetConfig"; then
# Cross-compiling, we need gcc not to read ./specs in order to build
# the g++ compiler (after the specs for the cross-gcc are created).
# Having LIBRARY_PATH= makes gcc read the specs from ., and the build
# breaks. Having this variable comes from the default.nix code to bring
# gcj in.
unset LIBRARY_PATH
unset CPATH
if test -z "$crossStageStatic"; then
EXTRA_FLAGS_TARGET="-g0 -O2 -B${libcCross}/lib -idirafter ${libcCross}/include"
EXTRA_LDFLAGS_TARGET="-Wl,-L${libcCross}/lib"
fi
else
if test -z "$NIX_CC_CROSS"; then
EXTRA_FLAGS_TARGET="$EXTRA_FLAGS"
EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS"
else
# This the case of cross-building the gcc.
# We need special flags for the target, different than those of the build
# Assertion:
test -e $NIX_CC_CROSS/nix-support/orig-libc
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
extraFlags="$(cat $NIX_CC_CROSS/nix-support/libc-cflags)"
extraLDFlags="$(cat $NIX_CC_CROSS/nix-support/libc-ldflags) $(cat $NIX_CC_CROSS/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).
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_CC_CROSS/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_CC_CROSS/nix-support/orig-libc)/lib"
extraFlags="-g0 -O2 -I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
extraLDFlags="--strip-debug -L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
EXTRA_FLAGS_TARGET="$extraFlags"
for i in $extraLDFlags; do
EXTRA_LDFLAGS_TARGET="$EXTRA_LDFLAGS_TARGET -Wl,$i"
done
fi
fi
# CFLAGS_FOR_TARGET are needed for the libstdc++ configure script to find
# the startfiles.
# FLAGS_FOR_TARGET are needed for the target libraries to receive the -Bxxx
# for the startfiles.
makeFlagsArray=( \
"${makeFlagsArray[@]}" \
NATIVE_SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
SYSTEM_HEADER_DIR="$NIX_FIXINC_DUMMY" \
CFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
CFLAGS_FOR_TARGET="$EXTRA_FLAGS_TARGET $EXTRA_LDFLAGS_TARGET" \
FLAGS_FOR_TARGET="$EXTRA_FLAGS_TARGET $EXTRA_LDFLAGS_TARGET" \
LDFLAGS_FOR_BUILD="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
LDFLAGS_FOR_TARGET="$EXTRA_FLAGS_TARGET $EXTRA_LDFLAGS_TARGET" \
)
if test -z "$targetConfig"; then
makeFlagsArray=( \
"${makeFlagsArray[@]}" \
BOOT_CFLAGS="$EXTRA_FLAGS $EXTRA_LDFLAGS" \
BOOT_LDFLAGS="$EXTRA_FLAGS_TARGET $EXTRA_LDFLAGS_TARGET" \
)
fi
if test -n "$targetConfig" -a "$crossStageStatic" == 1; then
# We don't want the gcc build to assume there will be a libc providing
# limits.h in this stagae
makeFlagsArray=( \
"${makeFlagsArray[@]}" \
LIMITS_H_TEST=false \
)
else
makeFlagsArray=( \
"${makeFlagsArray[@]}" \
LIMITS_H_TEST=true \
)
fi
fi
if test -n "$targetConfig"; then
# The host strip will destroy some important details of the objects
dontStrip=1
fi
preConfigure() {
if test -n "$newlibSrc"; then
tar xvf "$newlibSrc" -C ..
ln -s ../newlib-*/newlib newlib
# Patch to get armvt5el working:
sed -i -e 's/ arm)/ arm*)/' newlib/configure.host
fi
# Bug - they packaged zlib
if test -d "zlib"; then
# This breaks the build without-headers, which should build only
# the target libgcc as target libraries.
# See 'configure:5370'
rm -Rf zlib
fi
# 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
rm -rf $out/lib/gcc/*/*/install-tools
# Get rid of some "fixed" header files
rm -rf $out/lib/gcc/*/*/include/root
# Replace hard links for i686-pc-linux-gnu-gcc etc. with symlinks.
for i in $out/bin/*-gcc*; do
if cmp -s $out/bin/gcc $i; then
ln -sfn gcc $i
fi
done
for i in $out/bin/*-c++* $out/bin/*-g++*; do
if cmp -s $out/bin/g++ $i; then
ln -sfn g++ $i
fi
done
eval "$postInstallGhdl"
}
if test -z "$targetConfig" && test -z "$crossConfig"; then
if test -z "$profiledCompiler"; then
buildFlags="bootstrap $buildFlags"
else
buildFlags="profiledbootstrap $buildFlags"
fi
fi
genericBuild

View File

@ -1,310 +0,0 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
, langJava ? false
, langAda ? false
, langVhdl ? false
, profiledCompiler ? false
, staticCompiler ? false
, enableShared ? true
, texinfo ? null
, gmp, mpfr, gettext, which
, ppl ? null, cloogppl ? null # used by the Graphite optimization framework
, zlib ? null, boehmgc ? null
, zip ? null, unzip ? null, pkgconfig ? null, gtk ? null, libart_lgpl ? null
, libX11 ? null, libXt ? null, libSM ? null, libICE ? null, libXtst ? null
, libXrender ? null, xproto ? null, renderproto ? null, xextproto ? null
, libXrandr ? null, libXi ? null, inputproto ? null, randrproto ? null
, gnatboot ? null
, enableMultilib ? false
, name ? "gcc"
, cross ? null
, binutilsCross ? null
, libcCross ? null
, crossStageStatic ? true
, gnat ? null
}:
assert langJava -> zip != null && unzip != null
&& zlib != null && boehmgc != null;
assert langAda -> gnatboot != null;
assert langVhdl -> gnat != null;
with stdenv.lib;
let version = "4.4.7";
javaEcj = fetchurl {
# The `$(top_srcdir)/ecj.jar' file is automatically picked up at
# `configure' time.
# XXX: Eventually we might want to take it from upstream.
url = "ftp://sourceware.org/pub/java/ecj-4.3.jar";
sha256 = "0jz7hvc0s6iydmhgh5h2m15yza7p2rlss2vkif30vm9y77m97qcx";
};
# Antlr (optional) allows the Java `gjdoc' tool to be built. We want a
# binary distribution here to allow the whole chain to be bootstrapped.
javaAntlr = fetchurl {
url = http://www.antlr.org/download/antlr-3.1.3.jar;
sha256 = "1f41j0y4kjydl71lqlvr73yagrs2jsg1fjymzjz66mjy7al5lh09";
};
xlibs = [
libX11 libXt libSM libICE libXtst libXrender libXrandr libXi
xproto renderproto xextproto inputproto randrproto
];
javaAwtGtk = langJava && gtk != null;
/* Cross-gcc settings */
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
withArch = if gccArch != null then " --with-arch=${gccArch}" else "";
withCpu = if gccCpu != null then " --with-cpu=${gccCpu}" else "";
withAbi = if gccAbi != null then " --with-abi=${gccAbi}" else "";
crossConfigureFlags =
"--target=${cross.config}" +
withArch +
withCpu +
withAbi +
(if crossStageStatic then
" --disable-libssp --disable-nls" +
" --without-headers" +
" --disable-threads " +
" --disable-libmudflap " +
" --disable-libgomp " +
" --disable-shared" +
" --disable-decimal-float" # libdecnumber requires libc
else
" --with-headers=${libcCross}/include" +
" --enable-__cxa_atexit" +
" --enable-long-long" +
" --enable-threads=posix" +
" --enable-nls" +
" --disable-decimal-float" # No final libdecnumber (it may work only in 386)
);
stageNameAddon = if crossStageStatic then "-stage-static" else
"-stage-final";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
in
# We need all these X libraries when building AWT with GTK+.
assert gtk != null -> (filter (x: x == null) xlibs) == [];
stdenv.mkDerivation ({
name = "${name}-${version}" + crossNameAddon;
builder = ./builder.sh;
src = (import ./sources.nix) {
inherit fetchurl optional version;
inherit langC langCC langFortran langJava langAda;
};
patches =
[ ./pass-cxxcpp.patch
# libmudflap and libstdc++ receive the build CPP,
# and not the target.
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42279
./target-cpp.patch
# Bad mixture of build/target flags
./libstdc++-target.patch
# Compatibility with newer Glibc.
./siginfo_t_fix.patch
]
++ optional noSysDirs ./no-sys-dirs.patch
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
# target libraries and tools.
++ optional langAda ./gnat-cflags.patch
++ optional langVhdl ./ghdl-ortho-cflags.patch
++ optional (cross != null && cross.arch == "sparc64") ./pr41818.patch;
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
libcCross;
nativeBuildInputs = [ texinfo which ];
buildInputs = [ gmp mpfr gettext ]
++ (optional (ppl != null) ppl)
++ (optional (cloogppl != null) cloogppl)
++ (optional (zlib != null) zlib)
++ (optional (boehmgc != null) boehmgc)
++ (optionals langJava [zip unzip])
++ (optionals javaAwtGtk ([gtk pkgconfig libart_lgpl] ++ xlibs))
++ (optionals (cross != null) [binutilsCross])
++ (optionals langAda [gnatboot])
++ (optionals langVhdl [gnat])
;
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
${if ppl != null then "--with-ppl=${ppl}" else ""}
${if cloogppl != null then "--with-cloog=${cloogppl}" else ""}
${if langJava then "--with-ecj-jar=${javaEcj}" else ""}
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr}" else ""}
--with-gmp=${gmp}
--with-mpfr=${mpfr}
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
--enable-languages=${
concatStrings (intersperse ","
( optional langC "c"
++ optional langCC "c++"
++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langAda "ada"
++ optional langVhdl "vhdl"
)
)
}
${if langAda then " --enable-libada" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
";
targetConfig = if cross != null then cross.config else null;
# Needed for the cross compilation to work
AR = "ar";
LD = "ld";
CC = "gcc";
crossAttrs = {
AR = "${stdenv.cross.config}-ar";
LD = "${stdenv.cross.config}-ld";
CC = "${stdenv.cross.config}-gcc";
CXX = "${stdenv.cross.config}-gcc";
AR_FOR_TARGET = "${stdenv.cross.config}-ar";
LD_FOR_TARGET = "${stdenv.cross.config}-ld";
CC_FOR_TARGET = "${stdenv.cross.config}-gcc";
NM_FOR_TARGET = "${stdenv.cross.config}-nm";
CXX_FOR_TARGET = "${stdenv.cross.config}-g++";
# If we are making a cross compiler, cross != null
NIX_CC_CROSS = if cross == null then "${stdenv.ccCross}" else "";
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
${if cloogppl != null then "--with-cloog=${cloogppl.crossDrv}" else ""}
${if langJava then "--with-ecj-jar=${javaEcj.crossDrv}" else ""}
${if javaAwtGtk then "--enable-java-awt=gtk" else ""}
${if langJava && javaAntlr != null then "--with-antlr-jar=${javaAntlr.crossDrv}" else ""}
--with-gmp=${gmp.crossDrv}
--with-mpfr=${mpfr.crossDrv}
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
--enable-languages=${
concatStrings (intersperse ","
( optional langC "c"
++ optional langCC "c++"
++ optional langFortran "fortran"
++ optional langJava "java"
++ optional langAda "ada"
++ optional langVhdl "vhdl"
)
)
}
${if langAda then " --enable-libada" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
--target=${stdenv.cross.config}
";
};
# Setting $CPATH and $LIBRARY_PATH to make sure both `gcc' and `xgcc' find
# the library headers and binaries, regarless of the language being
# compiled.
# Note: When building the Java AWT GTK+ peer, the build system doesn't
# honor `--with-gmp' et al., e.g., when building
# `libjava/classpath/native/jni/java-math/gnu_java_math_GMP.c', so we just
# add them to $CPATH and $LIBRARY_PATH in this case.
CPATH = concatStrings
(intersperse ":" (map (x: x + "/include")
(optionals langJava [ boehmgc zlib ]
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ])));
LIBRARY_PATH = concatStrings
(intersperse ":" (map (x: x + "/lib")
(optionals langJava [ boehmgc zlib ]
++ optionals javaAwtGtk xlibs
++ optionals javaAwtGtk [ gmp mpfr ])));
passthru = { inherit langC langCC langAda langFortran langVhdl
enableMultilib version; isGNU = true; };
# ghdl does not build fine with parallel building
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46173
#enableParallelBuilding = !langVhdl && !langAda;
meta = {
homepage = http://gcc.gnu.org/;
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+
description = "GNU Compiler Collection, version ${version}";
longDescription = ''
The GNU Compiler Collection includes compiler front ends for C, C++,
Objective-C, Fortran, OpenMP for C/C++/Fortran, Java, and Ada, as well
as libraries for these languages (libstdc++, libgcj, libgomp,...).
GCC development is a part of the GNU Project, aiming to improve the
compiler used in the GNU system including the GNU/Linux variant.
'';
maintainers = [
# Add your name here!
stdenv.lib.maintainers.viric
];
# Volunteers needed for the {Cyg,Dar}win ports of *PPL.
# gnatboot is not available out of linux platforms, so we disable the darwin build
# for the gnat (ada compiler).
platforms = stdenv.lib.platforms.linux ++ optionals (langAda == false) [ "i686-darwin" ];
};
}
// (if langVhdl then rec {
name = "ghdl-0.29";
ghdlSrc = fetchurl {
url = "http://ghdl.free.fr/ghdl-0.29.tar.bz2";
sha256 = "15mlinr1lwljwll9ampzcfcrk9bk0qpdks1kxlvb70xf9zhh2jva";
};
# Ghdl has some timestamps checks, storing file timestamps in '.cf' files.
# As we will change the timestamps to 1970-01-01 00:00:01, we also set the
# content of that .cf to that value. This way ghdl does not complain on
# the installed object files from the basic libraries (ieee, ...)
postInstallGhdl = ''
pushd $out
find . -name "*.cf" -exec \
sed 's/[0-9]*\.000" /19700101000001.000" /g' -i {} \;
popd
'';
postUnpack = ''
tar xvf ${ghdlSrc}
mv ghdl-*/vhdl gcc*/gcc
rm -Rf ghdl-*
'';
meta = {
homepage = "http://ghdl.free.fr/";
license = stdenv.lib.licenses.gpl2Plus;
description = "Complete VHDL simulator, using the GCC technology (gcc ${version})";
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
};
} else {}))

View File

@ -1,111 +0,0 @@
diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
index 8f481df..681ac59 100644
--- a/gcc/vhdl/Make-lang.in
+++ b/gcc/vhdl/Make-lang.in
@@ -96,7 +96,7 @@ AGCC_GCCOBJ_DIR=../
AGCC_INC_FLAGS=-I$(AGCC_GCCOBJ_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/include \
-I$(AGCC_GCCSRC_DIR)/gcc -I$(AGCC_GCCSRC_DIR)/gcc/config \
-I$(AGCC_GCCSRC_DIR)/libcpp/include
-AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS)
+AGCC_CFLAGS=-g -Wall -DIN_GCC $(AGCC_INC_FLAGS) $(CFLAGS) $(INCLUDES)
AGCC_LOCAL_OBJS=ortho-lang.o
@@ -140,7 +140,7 @@ ghdl$(exeext): force
# Ghdl libraries.
ghdllib: ghdl$(exeext) $(GCC_PASSES) force
- $(MAKE_IN_VHDL) GRT_FLAGS="-O -g" ghdllib
+ $(MAKE_IN_VHDL) GRT_FLAGS="-O -g $(CFLAGS)" ghdllib
# Build hooks:
diff --git a/gcc/vhdl/Makefile.in b/gcc/vhdl/Makefile.in
index d754c6c..07abc4a 100644
--- a/gcc/vhdl/Makefile.in
+++ b/gcc/vhdl/Makefile.in
@@ -80,7 +80,8 @@ T_CPPFLAGS =
X_ADAFLAGS =
T_ADAFLAGS =
-ADAC = $(CC)
+# Never use the bootstrapped compiler, as it may not be built for ada
+ADAC = gcc
ECHO = echo
CHMOD = chmod
diff --git a/gcc/vhdl/ortho-lang.c b/gcc/vhdl/ortho-lang.c
index 84aeb92..8eddd42 100644
--- a/gcc/vhdl/ortho-lang.c
+++ b/gcc/vhdl/ortho-lang.c
@@ -16,6 +16,7 @@
#include "options.h"
#include "real.h"
-#include "tree-gimple.h"
+#include "gimple.h"
+#include "tree.h"
#include "function.h"
#include "cgraph.h"
#include "target.h"
@@ -680,38 +681,10 @@ type_for_mode (enum machine_mode mode, int unsignedp)
const struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER;
-/* Tree code classes. */
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) TYPE,
-
-const enum tree_code_class tree_code_type[] = {
-#include "tree.def"
- 'x'
-};
-#undef DEFTREECODE
-
-/* Table indexed by tree code giving number of expression
- operands beyond the fixed part of the node structure.
- Not used for types or decls. */
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) LENGTH,
-
-const unsigned char tree_code_length[] = {
-#include "tree.def"
- 0
-};
-#undef DEFTREECODE
-
-#define DEFTREECODE(SYM, NAME, TYPE, LENGTH) NAME,
-const char * const tree_code_name[] = {
-#include "tree.def"
- "@@dummy"
-};
-#undef DEFTREECODE
union lang_tree_node
GTY((desc ("0"),
- chain_next ("(union lang_tree_node *) GENERIC_NEXT (&%h.generic)")))
+ chain_next ("(union lang_tree_node *) TREE_CHAIN (&%h.generic)")))
{
union tree_node GTY ((tag ("0"))) generic;
};
@@ -1162,7 +1135,7 @@ new_access_type (tree dtype)
res = make_node (POINTER_TYPE);
TREE_TYPE (res) = NULL_TREE;
/* Seems necessary. */
- TYPE_MODE (res) = Pmode;
+ SET_TYPE_MODE (res, Pmode);
layout_type (res);
return res;
}
diff --git a/gcc/vhdl/Make-lang.in b/gcc/vhdl/Make-lang.in
index e201f64..f36fb97 100644
--- a/gcc/vhdl/Make-lang.in
+++ b/gcc/vhdl/Make-lang.in
@@ -132,7 +132,7 @@ ghdl1$(exeext): $(AGCC_OBJS) $(AGCC_DEPS) force
-cargs $(CFLAGS) $(GHDL_ADAFLAGS)
$(GNATMAKE) -o $@ -aI$(srcdir)/vhdl -aOvhdl ortho_gcc-main \
-bargs -E -cargs $(CFLAGS) $(GHDL_ADAFLAGS) \
- -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS)
+ -largs $(AGCC_OBJS) $(LIBS) $(GMPLIBS) $(CLOOGLIBS) $(PPLLIBS)
# The driver for ghdl.
ghdl$(exeext): force

View File

@ -1,33 +0,0 @@
diff --git a/libada/Makefile.in b/libada/Makefile.in
index f5057a0..337e0c6 100644
--- a/libada/Makefile.in
+++ b/libada/Makefile.in
@@ -55,7 +55,7 @@ GCC_WARN_CFLAGS = $(LOOSE_WARN)
WARN_CFLAGS = @warn_cflags@
TARGET_LIBGCC2_CFLAGS=
-GNATLIBCFLAGS= -g -O2
+GNATLIBCFLAGS= -g -O2 $(CFLAGS)
GNATLIBCFLAGS_FOR_C = $(GNATLIBCFLAGS) $(TARGET_LIBGCC2_CFLAGS) -fexceptions \
-DIN_RTS @have_getipinfo@
--- a/gcc/ada/gcc-interface/Makefile.in
+++ b/gcc/ada/gcc-interface/Makefile.in
@@ -105,7 +105,7 @@ ADAFLAGS = -W -Wall -gnatpg -gnata
SOME_ADAFLAGS =-gnata
FORCE_DEBUG_ADAFLAGS = -g
GNATLIBFLAGS = -gnatpg -nostdinc
-GNATLIBCFLAGS = -g -O2
+GNATLIBCFLAGS = -g -O2 $(CFLAGS_FOR_TARGET)
# Pretend that _Unwind_GetIPInfo is available for the target by default. This
# should be autodetected during the configuration of libada and passed down to
# here, but we need something for --disable-libada and hope for the best.
@@ -1838,7 +1838,7 @@ ADA_INCLUDE_SRCS =\
LIBGNAT=../$(RTSDIR)/libgnat.a
-GCC_LINK=$(CC) -static-libgcc $(ADA_INCLUDES)
+GCC_LINK=$(CC) -static-libgcc $(CFLAGS_FOR_TARGET) $(ADA_INCLUDES)
# when compiling the tools, the runtime has to be first on the path so that
# it hides the runtime files lying with the rest of the sources

View File

@ -1,15 +0,0 @@
diff --git a/Makefile.in b/Makefile.in
index 245c770..8545b60 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -250,8 +250,8 @@ BASE_TARGET_EXPORTS = \
RAW_CXX_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
- CXX="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD)"; export CXX; \
- CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD) -E"; export CXXCPP;
+ CXX="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_TARGET)"; export CXX; \
+ CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_TARGET) -E"; export CXXCPP;
NORMAL_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \

View File

@ -1,66 +0,0 @@
diff -ru gcc-4.3.1-orig/gcc/cppdefault.c gcc-4.3.1/gcc/cppdefault.c
--- gcc-4.3.1-orig/gcc/cppdefault.c 2007-07-26 10:37:01.000000000 +0200
+++ gcc-4.3.1/gcc/cppdefault.c 2008-06-25 17:48:23.000000000 +0200
@@ -41,6 +41,10 @@
# 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 -ru gcc-4.3.1-orig/gcc/gcc.c gcc-4.3.1/gcc/gcc.c
--- gcc-4.3.1-orig/gcc/gcc.c 2008-03-02 23:55:19.000000000 +0100
+++ gcc-4.3.1/gcc/gcc.c 2008-06-25 17:52:53.000000000 +0200
@@ -1478,10 +1478,10 @@
/* Default prefixes to attach to command names. */
#ifndef STANDARD_STARTFILE_PREFIX_1
-#define STANDARD_STARTFILE_PREFIX_1 "/lib/"
+#define STANDARD_STARTFILE_PREFIX_1 ""
#endif
#ifndef STANDARD_STARTFILE_PREFIX_2
-#define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
+#define STANDARD_STARTFILE_PREFIX_2 ""
#endif
#ifdef CROSS_DIRECTORY_STRUCTURE /* Don't use these prefixes for a cross compiler. */
@@ -1515,8 +1515,8 @@
/* For native compilers, these are well-known paths containing
components that may be provided by the system. For cross
compilers, these paths are not used. */
-static const char *const standard_exec_prefix_1 = "/usr/libexec/gcc/";
-static const char *const standard_exec_prefix_2 = "/usr/lib/gcc/";
+static const char *const standard_exec_prefix_1 = "/no-such-path/";
+static const char *const standard_exec_prefix_2 = "/no-such-path/";
static const char *md_exec_prefix = MD_EXEC_PREFIX;
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
diff -ru gcc-4.3.1-orig/gcc/Makefile.in gcc-4.3.1/gcc/Makefile.in
--- gcc-4.3.1-orig/gcc/Makefile.in 2008-05-11 20:54:15.000000000 +0200
+++ gcc-4.3.1/gcc/Makefile.in 2008-06-25 17:48:23.000000000 +0200
@@ -378,7 +378,11 @@
MD5_H = $(srcdir)/../include/md5.h
# Default native SYSTEM_HEADER_DIR, to be overridden by targets.
-NATIVE_SYSTEM_HEADER_DIR = /usr/include
+# 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@
@@ -3277,7 +3281,7 @@
-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)\" \
+ -DLOCAL_INCLUDE_DIR=\"/no-such-dir\" \
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
-DTOOL_INCLUDE_DIR=\"$(gcc_tooldir)/include\" \
-DPREFIX=\"$(prefix)/\" \

View File

@ -1,21 +0,0 @@
diff -rc gcc-orig/Makefile.in gcc-4.1.1/Makefile.in
*** gcc-orig/Makefile.in Wed Jun 21 13:40:23 2006
--- gcc-4.1.1/Makefile.in Wed Jun 21 14:19:44 2006
***************
*** 213,219 ****
RAW_CXX_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
! CXX="$(RAW_CXX_FOR_TARGET)"; export CXX;
NORMAL_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
--- 213,220 ----
RAW_CXX_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \
CXX_FOR_TARGET="$(RAW_CXX_FOR_TARGET)"; export CXX_FOR_TARGET; \
! CXX="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD)"; export CXX; \
! CXXCPP="$(RAW_CXX_FOR_TARGET) $(CFLAGS_FOR_BUILD) -E"; export CXXCPP;
NORMAL_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \

View File

@ -1,26 +0,0 @@
From <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41818>. This fixes compilation
of the sparc64-linux-gnu cross-compiler with shared libraries.
--- trunk/Makefile.in 2010/01/07 19:21:46 155705
+++ trunk/Makefile.in 2010/01/07 19:53:50 155706
@@ -259,7 +259,7 @@
# directories built for the target.
TARGET_CONFIGARGS = @target_configargs@ --with-target-subdir="$(TARGET_SUBDIR)"
# This is the list of variables to export in the environment when
-# configuring subdirectories for the host system.
+# configuring subdirectories for the target system.
BASE_TARGET_EXPORTS = \
$(BASE_EXPORTS) \
AR="$(AR_FOR_TARGET)"; export AR; \
@@ -281,7 +281,10 @@
STRIP="$(STRIP_FOR_TARGET)"; export STRIP; \
WINDRES="$(WINDRES_FOR_TARGET)"; export WINDRES; \
WINDMC="$(WINDMC_FOR_TARGET)"; export WINDMC; \
- $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
+@if gcc-bootstrap
+ $(RPATH_ENVVAR)=`echo "$(TARGET_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR); \
+@endif gcc-bootstrap
+ $(RPATH_ENVVAR)=`echo "$(HOST_LIB_PATH)$$$(RPATH_ENVVAR)" | sed 's,::*,:,g;s,^:*,,;s,:*$$,,'`; export $(RPATH_ENVVAR);
RAW_CXX_TARGET_EXPORTS = \
$(BASE_TARGET_EXPORTS) \

View File

@ -1,174 +0,0 @@
https://bugs.gentoo.org/424970
fix from upstream for building with newer glibc versions
From f0cdca2bf2230005025e13e7354fedb612933c96 Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 20 Apr 2012 08:14:00 +0000
Subject: [PATCH] struct siginfo vs. siginfo_t
Backport from trunk (but apply to gcc/):
2012-04-20 Thomas Schwinge <thomas@codesourcery.com>
gcc/
* config/alpha/linux-unwind.h (alpha_fallback_frame_state): Use
siginfo_t instead of struct siginfo.
* config/bfin/linux-unwind.h (bfin_fallback_frame_state): Likewise.
* config/i386/linux-unwind.h (x86_fallback_frame_state): Likewise.
* config/ia64/linux-unwind.h (ia64_fallback_frame_state)
(ia64_handle_unwabi): Likewise.
* config/mips/linux-unwind.h (mips_fallback_frame_state): Likewise.
* config/pa/linux-unwind.h (pa32_fallback_frame_state): Likewise.
* config/sh/linux-unwind.h (shmedia_fallback_frame_state)
(sh_fallback_frame_state): Likewise.
* config/xtensa/linux-unwind.h (xtensa_fallback_frame_state): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_5-branch@186613 138bc75d-0d04-0410-961f-82ee72b054a4
---
gcc/ChangeLog | 20 ++++++++++++++++++++
gcc/config/alpha/linux-unwind.h | 4 ++--
gcc/config/bfin/linux-unwind.h | 6 +++---
gcc/config/i386/linux-unwind.h | 6 +++---
gcc/config/ia64/linux-unwind.h | 6 +++---
gcc/config/mips/linux-unwind.h | 5 +++--
gcc/config/pa/linux-unwind.h | 4 ++--
gcc/config/sh/linux-unwind.h | 9 +++++----
gcc/config/xtensa/linux-unwind.h | 4 ++--
9 files changed, 43 insertions(+), 21 deletions(-)
diff --git a/gcc/config/alpha/linux-unwind.h b/gcc/config/alpha/linux-unwind.h
index 4c811dc..8c04b3b 100644
--- a/gcc/config/alpha/linux-unwind.h
+++ b/gcc/config/alpha/linux-unwind.h
@@ -49,7 +49,7 @@ alpha_fallback_frame_state (struct _Unwind_Context *context,
else if (pc[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */
{
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
diff --git a/gcc/config/bfin/linux-unwind.h b/gcc/config/bfin/linux-unwind.h
index 88c8285..15bb2f1 100644
--- a/gcc/config/bfin/linux-unwind.h
+++ b/gcc/config/bfin/linux-unwind.h
@@ -48,10 +48,10 @@ bfin_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
int sig;
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
char retcode[8];
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
diff --git a/gcc/config/i386/linux-unwind.h b/gcc/config/i386/linux-unwind.h
index 36ee370..fe0ea3e 100644
--- a/gcc/config/i386/linux-unwind.h
+++ b/gcc/config/i386/linux-unwind.h
@@ -133,9 +133,9 @@ x86_fallback_frame_state (struct _Unwind_Context *context,
{
struct rt_sigframe {
int sig;
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/gcc/config/ia64/linux-unwind.h b/gcc/config/ia64/linux-unwind.h
index 93f762d..da31259 100644
--- a/gcc/config/ia64/linux-unwind.h
+++ b/gcc/config/ia64/linux-unwind.h
@@ -47,7 +47,7 @@ ia64_fallback_frame_state (struct _Unwind_Context *context,
struct sigframe {
char scratch[16];
unsigned long sig_number;
- struct siginfo *info;
+ siginfo_t *info;
struct sigcontext *sc;
} *frame_ = (struct sigframe *)context->psp;
struct sigcontext *sc = frame_->sc;
@@ -137,7 +137,7 @@ ia64_handle_unwabi (struct _Unwind_Context *context, _Unwind_FrameState *fs)
struct sigframe {
char scratch[16];
unsigned long sig_number;
- struct siginfo *info;
+ siginfo_t *info;
struct sigcontext *sc;
} *frame = (struct sigframe *)context->psp;
struct sigcontext *sc = frame->sc;
diff --git a/gcc/config/mips/linux-unwind.h b/gcc/config/mips/linux-unwind.h
index 02f7cd5..094ff58 100644
--- a/gcc/config/mips/linux-unwind.h
+++ b/gcc/config/mips/linux-unwind.h
@@ -75,7 +76,7 @@ mips_fallback_frame_state (struct _Unwind_Context *context,
struct rt_sigframe {
u_int32_t ass[4]; /* Argument save space for o32. */
u_int32_t trampoline[2];
- struct siginfo info;
+ siginfo_t info;
_sig_ucontext_t uc;
} *rt_ = context->cfa;
sc = &rt_->uc.uc_mcontext;
diff --git a/gcc/config/pa/linux-unwind.h b/gcc/config/pa/linux-unwind.h
index a0560e9..38b4eda 100644
--- a/gcc/config/pa/linux-unwind.h
+++ b/gcc/config/pa/linux-unwind.h
@@ -63,7 +63,7 @@ pa32_fallback_frame_state (struct _Unwind_Context *context,
int i;
struct sigcontext *sc;
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *frame;
diff --git a/gcc/config/sh/linux-unwind.h b/gcc/config/sh/linux-unwind.h
index 94ed95d..5a78e31 100644
--- a/gcc/config/sh/linux-unwind.h
+++ b/gcc/config/sh/linux-unwind.h
@@ -80,9 +81,9 @@ shmedia_fallback_frame_state (struct _Unwind_Context *context,
&& (*(unsigned long *) (pc+11) == 0x6ff0fff0))
{
struct rt_sigframe {
- struct siginfo *pinfo;
+ siginfo_t *pinfo;
void *puc;
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
@@ -179,7 +180,7 @@ sh_fallback_frame_state (struct _Unwind_Context *context,
&& (*(unsigned short *) (pc+14) == 0x00ad))))
{
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_ = context->cfa;
/* The void * cast is necessary to avoid an aliasing warning.
diff --git a/gcc/config/xtensa/linux-unwind.h b/gcc/config/xtensa/linux-unwind.h
index 32e9349..2456497 100644
--- a/gcc/config/xtensa/linux-unwind.h
+++ b/gcc/config/xtensa/linux-unwind.h
@@ -62,7 +62,7 @@ xtensa_fallback_frame_state (struct _Unwind_Context *context,
struct sigcontext *sc;
struct rt_sigframe {
- struct siginfo info;
+ siginfo_t info;
struct ucontext uc;
} *rt_;
--
1.7.9.7

View File

@ -1,26 +0,0 @@
/* Automatically generated by `update-gcc.sh', do not edit.
For GCC 4.4.7. */
{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda }:
assert version == "4.4.7";
optional /* langC */ true (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-core-${version}.tar.bz2";
sha256 = "c4663b7023909a4a075d3c2b2e17f6e082a9625aebfd0ce7f1d7817e44bf5542";
}) ++
optional langCC (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-g++-${version}.tar.bz2";
sha256 = "1882ff29be51eeb3fb349cbcda9df200a5c3cd20c97dd1d593101e0998b3c469";
}) ++
optional langFortran (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-fortran-${version}.tar.bz2";
sha256 = "545a1e8e97d9364de4408c6a91830f9051ce24b4fbfbfdc56e72c7b4be17ebdd";
}) ++
optional langJava (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-java-${version}.tar.bz2";
sha256 = "3c31ddd80f945b797d8d4ed7761426c26343781c361ec1b33bcea9874cc4c6c0";
}) ++
optional langAda (fetchurl {
url = "mirror://gcc/releases/gcc-${version}/gcc-ada-${version}.tar.bz2";
sha256 = "fb9f30b85d48838390554b948d137487f0db09ad5f8ba73ca4d7ca35765c6ed8";
}) ++
[]

View File

@ -1,12 +0,0 @@
diff --git a/Makefile.in b/Makefile.in
index 8545b60..1fab64d 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -231,6 +231,7 @@ BASE_TARGET_EXPORTS = \
CC="$(CC_FOR_TARGET)"; export CC; \
CFLAGS="$(CFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CFLAGS; \
CONFIG_SHELL="$(SHELL)"; export CONFIG_SHELL; \
+ CPP="$(CC_FOR_TARGET) -E"; export CPP; \
CPPFLAGS="$(CPPFLAGS_FOR_TARGET)"; export CPPFLAGS; \
CXXFLAGS="$(CXXFLAGS_FOR_TARGET) $(SYSROOT_CFLAGS_FOR_TARGET) $(DEBUG_PREFIX_CFLAGS_FOR_TARGET)"; export CXXFLAGS; \
GCJ="$(GCJ_FOR_TARGET)"; export GCJ; \

View File

@ -1,64 +0,0 @@
#!/bin/sh
if [ $# -ne 1 ]
then
echo "Usage: $(basename $0) VERSION"
echo
echo "Download and GPG-check component tarballs for GCC VERSION."
exit 1
fi
version="$1"
set -e
out="sources.nix"
declare -A options
options["core"]="/* langC */ true"
options["g++"]="langCC"
options["fortran"]="langFortran"
options["java"]="langJava"
options["ada"]="langAda"
#options["go"]="langGo"
cat > "$out"<<EOF
/* Automatically generated by \`$(basename $0)', do not edit.
For GCC ${version}. */
{ fetchurl, optional, version, langC, langCC, langFortran, langJava, langAda,
langGo }:
assert version == "${version}";
EOF
for component in core g++ fortran java ada #go
do
dir="ftp.gnu.org/gnu/gcc/gcc-${version}"
file="gcc-${component}-${version}.tar.bz2"
url="${dir}/${file}"
rm -f "${file}"
wget "$url"
hash="$(nix-hash --flat --type sha256 "$file")"
path="$(nix-store --add-fixed sha256 "$file")"
rm -f "${file}" "${file}.sig"
wget "${url}.sig"
gpg --verify "${file}.sig" "${path}" || gpg2 --verify "${file}.sig" "${path}"
rm "${file}.sig"
cat >> "$out" <<EOF
optional ${options[$component]} (fetchurl {
url = "mirror://gcc/releases/gcc-\${version}/gcc-${component}-\${version}.tar.bz2";
sha256 = "${hash}";
}) ++
EOF
done
cat >> "$out" <<EOF
[]
EOF
echo "result stored in \`$out'"

View File

@ -495,6 +495,8 @@ stdenv.mkDerivation ({
inherit (stdenv) is64bit;
setupHook = ./use-old-abi.sh;
meta = {
homepage = http://gcc.gnu.org/;
license = stdenv.lib.licenses.gpl3Plus; # runtime support libraries are typically LGPLv3+

View File

@ -0,0 +1 @@
NIX_CFLAGS_COMPILE+=" -D_GLIBCXX_USE_CXX11_ABI=0"

View File

@ -1,4 +1,4 @@
{ fetchurl, fetchgit, stdenv, xorg, gcc44, makeWrapper, ncurses, cmake }:
{ fetchurl, fetchgit, stdenv, xorg, makeWrapper, ncurses, cmake }:
stdenv.mkDerivation rec {
# The Self wrapper stores source in $XDG_DATA_HOME/self or ~/.local/share/self
@ -20,8 +20,7 @@ stdenv.mkDerivation rec {
sha256 = "966025b71542e44fc830b951f404f5721ad410ed24f7236fd0cd820ea0fc5731";
};
# gcc 4.6 and above causes crashes on Self startup but gcc 4.4 works.
buildInputs = [ gcc44 ncurses xorg.libX11 xorg.libXext makeWrapper cmake ];
buildInputs = [ ncurses xorg.libX11 xorg.libXext makeWrapper cmake ];
selfWrapper = ./self;
@ -36,9 +35,10 @@ stdenv.mkDerivation rec {
meta = {
description = "A prototype-based dynamic object-oriented programming language, environment, and virtual machine";
homepage = "http://selflanguage.org/";
homepage = http://selflanguage.org/;
license = stdenv.lib.licenses.bsd3;
maintainers = [ stdenv.lib.maintainers.doublec ];
platforms = with stdenv.lib.platforms; linux;
broken = true; # segfaults on gcc > 4.4
};
}

View File

@ -29,5 +29,6 @@ stdenv.mkDerivation {
description = "Library for manipulation of term data structures in C";
platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
maintainers = [ stdenv.lib.maintainers.eelco ];
broken = true;
};
}

View File

@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
./disable-fma.patch # http://lists.gnu.org/archive/html/bug-gsl/2011-11/msg00019.html
];
doCheck = true;
doCheck = stdenv.system != "i686-linux"; # https://lists.gnu.org/archive/html/bug-gsl/2015-11/msg00012.html
meta = {
description = "The GNU Scientific Library, a large numerical library";

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ stdenv, fetchFromGitHub, fetchurl }:
stdenv.mkDerivation rec {
name = "libcli-${version}";
@ -11,6 +11,13 @@ stdenv.mkDerivation rec {
owner = "dparrish";
};
patches =
[ (fetchurl {
url = "https://github.com/dparrish/libcli/commit/ebc5a09db457ee1be9996711463cbbafe5ea72d5.patch";
sha256 = "0szjiw3gd7by1sv924shnngfxvc98xvaqvx228b575xq93xxjcwl";
})
];
enableParallelBuilding = true;
makeFlags = [ "PREFIX=$(out)" ];

View File

@ -18,5 +18,6 @@ stdenv.mkDerivation rec {
meta = {
platforms = stdenv.lib.platforms.all;
maintainers = [ stdenv.lib.maintainers.urkud ];
broken = true; # doesn't build with GCC 5; fix in GitHub
};
}

View File

@ -8,6 +8,7 @@ stdenv.mkDerivation rec {
url = "http://telepathy.freedesktop.org/releases/telepathy-qt/${name}.tar.gz";
sha256 = "1y51c6rxk5qvmab98c8rnmrlyk27hnl248casvbq3cd93sav8vj9";
};
patches = let
mkUrl = hash: "http://cgit.freedesktop.org/telepathy/telepathy-qt/patch/?id=" + hash;
in [
@ -36,7 +37,7 @@ stdenv.mkDerivation rec {
cmakeFlags = "-DDESIRED_QT_VERSION=${builtins.substring 0 1 qtbase.version}";
# should be removable after the next update
NIX_CFLAGS_COMPILE = [ "-Wno-error=cpp" "-Wno-error=unused-but-set-variable" ];
NIX_CFLAGS_COMPILE = [ "-Wno-error" ];
preBuild = ''
NIX_CFLAGS_COMPILE+=" `pkg-config --cflags dbus-glib-1`"

View File

@ -26,5 +26,6 @@ stdenv.mkDerivation {
license = "VXL License";
maintainers = with stdenv.lib.maintainers; [viric];
platforms = with stdenv.lib.platforms; linux;
broken = true; # requires fix for gcc 5: https://lists.fedoraproject.org/pipermail/scm-commits/Week-of-Mon-20150216/1511118.html
};
}

View File

@ -211,14 +211,9 @@ rec {
gmp = pkgs.gmp.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
mpfr = pkgs.mpfr.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
libmpc = pkgs.libmpc.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
isl_0_11 = pkgs.isl_0_11.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
cloog_0_18_0 = pkgs.cloog_0_18_0.override {
stdenv = pkgs.makeStaticLibraries pkgs.stdenv;
isl = isl_0_11;
};
isl_0_14 = pkgs.isl_0_14.override { stdenv = pkgs.makeStaticLibraries pkgs.stdenv; };
gccPlain = pkgs.gcc.cc.override {
isl = isl_0_11;
cloog = cloog_0_18_0;
isl = isl_0_14;
};
};
extraBuildInputs = [ stage2.pkgs.patchelf stage2.pkgs.paxctl ];

View File

@ -1,13 +1,12 @@
{stdenv, fetchgit, libuuid, lzo, zlib, acl}:
{ stdenv, fetchurl, libuuid, lzo, zlib, acl }:
stdenv.mkDerivation rec {
name = "mtd-utils-${version}";
version = "1.5.1";
version = "1.5.2";
src = fetchgit {
url = git://git.infradead.org/mtd-utils.git;
rev = "refs/tags/v" + version;
sha256 = "1bjx42pwl789ara63c672chvgvmqhkj4y132gajqih6naq71f8g7";
src = fetchurl {
url = ftp://ftp.infradead.org/pub/mtd-utils/mtd-utils-1.5.2.tar.bz2;
sha256 = "007lhsd8yb34l899r4m37whhzdw815cz4fnjbpnblfha524p7dax";
};
patchPhase = ''

View File

@ -4086,7 +4086,7 @@ let
gambit = callPackage ../development/compilers/gambit { };
gcc = gcc49;
gcc = gcc5;
gcc_multi =
if system == "x86_64-linux" then lowPrio (
@ -4147,13 +4147,6 @@ let
cross = crossSystem;
};
gcc44 = lowPrio (wrapCC (makeOverridable (import ../development/compilers/gcc/4.4) {
inherit fetchurl stdenv gmp mpfr /* ppl cloogppl */
gettext which noSysDirs;
texinfo = texinfo4;
profiledCompiler = true;
}));
gcc45 = lowPrio (wrapCC (callPackage ../development/compilers/gcc/4.5 {
inherit noSysDirs;
texinfo = texinfo4;
@ -4309,17 +4302,6 @@ let
profiledCompiler = false;
});
ghdl = wrapCC (import ../development/compilers/gcc/4.3 {
inherit stdenv fetchurl gmp mpfr noSysDirs gnat;
texinfo = texinfo4;
name = "ghdl";
langVhdl = true;
langCC = false;
langC = false;
profiledCompiler = false;
enableMultilib = false;
});
ghdl_mcode = callPackage ../development/compilers/ghdl { };
gcl = callPackage ../development/compilers/gcl {

View File

@ -117,7 +117,6 @@ let
gajim = linux;
gawk = all;
gcc = linux;
gcc44 = linux;
gcj = linux;
ghostscript = linux;
ghostscriptX = linux;