Merge remote-tracking branch 'origin/stdenv-updates'

This commit is contained in:
Eelco Dolstra
2013-03-07 23:09:05 +01:00
694 changed files with 7108 additions and 8258 deletions

View File

@@ -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

View File

@@ -1,63 +0,0 @@
# Nix expression for GCC-UPC 4.0, based on that of GCC 4.0.
{ stdenv, fetchurl, noSysDirs, bison, autoconf, gnum4
, profiledCompiler ? false
, gmp ? null , mpfr ? null
, texinfo ? null
}:
with stdenv.lib;
# GCC-UPC apparently doesn't support GCov and friends.
assert profiledCompiler == false;
stdenv.mkDerivation {
name = "gcc-upc-4.0.3.5";
builder = ../gcc/4.0/builder.sh;
src = fetchurl {
url = "ftp://ftp.intrepid.com/pub/upc/rls/upc-4.0.3.5/upc-4.0.3.5.src.tar.gz";
sha256 = "0afnz1bz0kknhl18205bbwncyza08983ivfaagj5yl7x3nwy7prv";
};
patches = [ ./honor-cflags.patch ]
++ optional noSysDirs [ ./no-sys-dirs.patch ];
inherit noSysDirs profiledCompiler;
# Attributes used by `wrapGCC'.
langC = true ;
langCC = false;
langF77 = false;
langUPC = true; # unused
buildInputs =
[ gmp mpfr texinfo
# Bison is needed to build the parsers.
bison
# For some reason, `autoheader' and `m4' are needed.
autoconf gnum4
];
# Note: We use `--enable-maintainer-mode' so that `bison' is actually
# run when needed.
configureFlags = "
--disable-multilib
--disable-libstdcxx-pch
--disable-libmudflap
--with-system-zlib
${if stdenv.isi686 then "--with-arch=i686" else ""}
--enable-maintainer-mode
";
meta = {
homepage = http://www.intrepid.com/upc.html;
license = "GPL/LGPL";
longDscription = ''
A GCC-based compiler for the Unified Parallel C (UPC) language,
a distributed shared memory aware variant of C (see
http://upc.gwu.edu/).
'';
};
}

View File

@@ -1,20 +0,0 @@
--- upc-4.0.3.5/gcc/upc/Make-lang.in 2008-03-03 18:56:13.000000000 +0100
+++ upc-4.0.3.5/gcc/upc/Make-lang.in 2008-03-03 18:57:27.000000000 +0100
@@ -70,7 +70,7 @@ xupc$(exeext): $(srcdir)/upc/upc-cmd.c M
"-DLIB_PATH=\"$${libdir}\"" \
"-DINC_PATH=\"$${incdir}\"" \
-c $(srcdir)/upc/upc-cmd.c -o xupc-tmp.o
- $(CC) xupc-tmp.o -o xupc$(exeext) $(LIBS)
+ $(CC) xupc-tmp.o $(ALL_CFLAGS) $(LDFLAGS) -o xupc$(exeext) $(LIBS)
rm -f xupc-tmp.o
upc-cmd$(exeext): $(srcdir)/upc/upc-cmd.c Makefile cc1upc$(exeext) $(LIBDEPS)
@@ -80,7 +80,7 @@ upc-cmd$(exeext): $(srcdir)/upc/upc-cmd.
"-DCOMPILER=\"gcc\"" \
"-DBIN_PATH=\"$(bindir)\"" \
-c $(srcdir)/upc/upc-cmd.c -o upc-cmd-tmp.o
- $(CC) upc-cmd-tmp.o -o upc-cmd$(exeext) $(LIBS)
+ $(CC) upc-cmd-tmp.o $(ALL_CFLAGS) $(LDFLAGS) -o upc-cmd$(exeext) $(LIBS)
rm -f upc-cmd-tmp.o
# UPC language specific files.

View File

@@ -1,202 +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@
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

View File

@@ -1,72 +0,0 @@
source $stdenv/setup
export NIX_FIXINC_DUMMY=$NIX_BUILD_TOP/dummy
mkdir $NIX_FIXINC_DUMMY
if test "$noSysDirs" = "1"; then
if test "$noSysDirs" = "1"; then
# Figure out what extra flags to pass to the gcc compilers
# being generated to make sure that they use our glibc.
if test -e $NIX_GCC/nix-support/orig-glibc; then
glibc=$(cat $NIX_GCC/nix-support/orig-glibc)
# Ugh. Copied from gcc-wrapper/builder.sh. We can't just
# source in $NIX_GCC/nix-support/add-flags, since that
# would cause *this* GCC to be linked against the
# *previous* GCC. Need some more modularity there.
extraCFlags="-B$glibc/lib -isystem $glibc/include"
extraLDFlags="-B$glibc/lib -L$glibc/lib -Wl,-s \
-Wl,-dynamic-linker,$glibc/lib/ld-linux.so.2"
# Oh, what a hack. I should be shot for this.
# In stage 1, we should link against the previous GCC, but
# not afterwards. Otherwise we retain a dependency.
# However, ld-wrapper, which adds the linker flags for the
# previous GCC, is also used in stage 2/3. We can prevent
# it from adding them by NIX_GLIBC_FLAGS_SET, but then
# gcc-wrapper will also not add them, thereby causing
# stage 1 to fail. So we use a trick to only set the
# flags in gcc-wrapper.
hook=$(pwd)/ld-wrapper-hook
echo "NIX_GLIBC_FLAGS_SET=1" > $hook
export NIX_LD_WRAPPER_START_HOOK=$hook
fi
export NIX_EXTRA_CFLAGS=$extraCFlags
export NIX_EXTRA_LDFLAGS=$extraLDFlags
export CFLAGS=$extraCFlags
export CXXFLAGS=$extraCFlags
export LDFLAGS=$extraLDFlags
export BOOT_LDFLAGS=$extraLDFlags
fi
else
patches=""
fi
preConfigure() {
# Determine the frontends to build.
langs="c"
if test -n "$langCC"; then
langs="$langs,c++"
fi
if test -n "$langF77"; then
langs="$langs,f77"
fi
# Perform the build in a different directory.
mkdir ../build
cd ../build
configureScript=../$sourceRoot/configure
configureFlags="--enable-languages=$langs"
}
buildFlags="bootstrap"
genericBuild

View File

@@ -1,17 +0,0 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langF77 ? false
}:
assert langC;
stdenv.mkDerivation {
name = "gcc-2.95.3";
builder = ./builder.sh;
src = fetchurl {
url = mirror://gnu/gcc/gcc-2.95.3.tar.gz;
md5 = "f3ad4f32c2296fad758ed051b5ac8e28";
};
# !!! apply only if noSysDirs is set
patches = [./no-sys-dirs.patch];
inherit noSysDirs langC langCC langF77;
}

View File

@@ -1,231 +0,0 @@
diff -rc gcc-orig/config.if gcc-2.95.3/config.if
*** gcc-orig/config.if 1998-10-18 19:37:10.000000000 +0200
--- gcc-2.95.3/config.if 2004-08-03 12:29:32.000000000 +0200
***************
*** 64,70 ****
return 0;
}
EOF
! ${CC-cc} $dummy.c -o $dummy 2>/dev/null
if [ "$?" = 0 ]
then
libc_interface=-libc6.`./$dummy`-
--- 64,70 ----
return 0;
}
EOF
! ${CC-cc} $NIX_EXTRA_CFLAGS $NIX_EXTRA_LDFLAGS $dummy.c -o $dummy 2>/dev/null
if [ "$?" = 0 ]
then
libc_interface=-libc6.`./$dummy`-
diff -rc gcc-orig/gcc/cccp.c gcc-2.95.3/gcc/cccp.c
*** gcc-orig/gcc/cccp.c 2001-01-25 15:03:00.000000000 +0100
--- gcc-2.95.3/gcc/cccp.c 2004-08-03 10:54:39.000000000 +0200
***************
*** 373,378 ****
--- 373,382 ----
char fname[1];
};
+ #undef LOCAL_INCLUDE_DIR
+ #undef SYSTEM_INCLUDE_DIR
+ #undef STANDARD_INCLUDE_DIR
+
/* #include "file" looks in source file dir, then stack. */
/* #include <file> just looks in the stack. */
/* -I directories are added to the end, then the defaults are added. */
***************
*** 424,430 ****
--- 428,436 ----
#ifndef STANDARD_INCLUDE_COMPONENT
#define STANDARD_INCLUDE_COMPONENT 0
#endif
+ #ifdef STANDARD_INCLUDE_DIR
{ STANDARD_INCLUDE_DIR, STANDARD_INCLUDE_COMPONENT, 0, 0, 0 },
+ #endif
#endif /* not CROSS_COMPILE */
{ 0, 0, 0, 0, 0 }
};
diff -rc gcc-orig/gcc/gcc.c gcc-2.95.3/gcc/gcc.c
*** gcc-orig/gcc/gcc.c 2001-01-25 15:03:16.000000000 +0100
--- gcc-2.95.3/gcc/gcc.c 2004-08-03 11:48:09.000000000 +0200
***************
*** 1369,1388 ****
#undef MD_STARTFILE_PREFIX_1
#endif
- #ifndef STANDARD_EXEC_PREFIX
- #define STANDARD_EXEC_PREFIX "/usr/local/lib/gcc-lib/"
- #endif /* !defined STANDARD_EXEC_PREFIX */
-
static const char *standard_exec_prefix = STANDARD_EXEC_PREFIX;
- static const char *standard_exec_prefix_1 = "/usr/lib/gcc/";
#ifdef MD_EXEC_PREFIX
static const char *md_exec_prefix = MD_EXEC_PREFIX;
#endif
- #ifndef STANDARD_STARTFILE_PREFIX
- #define STANDARD_STARTFILE_PREFIX "/usr/local/lib/"
- #endif /* !defined STANDARD_STARTFILE_PREFIX */
-
#ifdef MD_STARTFILE_PREFIX
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
#endif
--- 1369,1379 ----
***************
*** 1390,1401 ****
static const char *md_startfile_prefix_1 = MD_STARTFILE_PREFIX_1;
#endif
static const char *standard_startfile_prefix = STANDARD_STARTFILE_PREFIX;
- static const char *standard_startfile_prefix_1 = "/lib/";
- static const char *standard_startfile_prefix_2 = "/usr/lib/";
- #ifndef TOOLDIR_BASE_PREFIX
- #define TOOLDIR_BASE_PREFIX "/usr/local/"
- #endif
static const char *tooldir_base_prefix = TOOLDIR_BASE_PREFIX;
static const char *tooldir_prefix;
--- 1381,1387 ----
***************
*** 2896,2908 ****
value = argv[++i];
else
value = p + 1;
add_prefix (&exec_prefixes, value, NULL_PTR, 1, 0, &warn_B);
add_prefix (&startfile_prefixes, value, NULL_PTR,
1, 0, &warn_B);
add_prefix (&include_prefixes, concat (value, "include",
NULL_PTR),
NULL_PTR, 1, 0, NULL_PTR);
!
/* As a kludge, if the arg is "[foo/]stageN/", just add
"[foo/]include" to the include prefix. */
{
--- 2882,2897 ----
value = argv[++i];
else
value = p + 1;
+ if (strlen(value) > 0 && value[strlen(value) - 1] != '/')
+ value = concat (value, "/", NULL_PTR);
+ add_prefix (&startfile_prefixes, value, "BINUTILS", 0, 0, NULL_PTR);
add_prefix (&exec_prefixes, value, NULL_PTR, 1, 0, &warn_B);
add_prefix (&startfile_prefixes, value, NULL_PTR,
1, 0, &warn_B);
add_prefix (&include_prefixes, concat (value, "include",
NULL_PTR),
NULL_PTR, 1, 0, NULL_PTR);
!
/* As a kludge, if the arg is "[foo/]stageN/", just add
"[foo/]include" to the include prefix. */
{
***************
*** 3060,3073 ****
#ifndef OS2
add_prefix (&exec_prefixes, standard_exec_prefix, "BINUTILS",
0, 2, warn_std_ptr);
- add_prefix (&exec_prefixes, standard_exec_prefix_1, "BINUTILS",
- 0, 2, warn_std_ptr);
#endif
add_prefix (&startfile_prefixes, standard_exec_prefix, "BINUTILS",
0, 1, warn_std_ptr);
- add_prefix (&startfile_prefixes, standard_exec_prefix_1, "BINUTILS",
- 0, 1, warn_std_ptr);
tooldir_prefix = concat (tooldir_base_prefix, spec_machine,
dir_separator_str, NULL_PTR);
--- 3049,3058 ----
***************
*** 4865,4874 ****
NULL_PTR, 0, 0, NULL_PTR);
}
- add_prefix (&startfile_prefixes, standard_startfile_prefix_1,
- "BINUTILS", 0, 0, NULL_PTR);
- add_prefix (&startfile_prefixes, standard_startfile_prefix_2,
- "BINUTILS", 0, 0, NULL_PTR);
#if 0 /* Can cause surprises, and one can use -B./ instead. */
add_prefix (&startfile_prefixes, "./", NULL_PTR, 0, 1, NULL_PTR);
#endif
--- 4850,4855 ----
diff -rc gcc-orig/gcc/Makefile.in gcc-2.95.3/gcc/Makefile.in
*** gcc-orig/gcc/Makefile.in 2001-01-25 15:02:58.000000000 +0100
--- gcc-2.95.3/gcc/Makefile.in 2004-08-03 12:24:39.000000000 +0200
***************
*** 74,80 ****
BOOT_CFLAGS = -O2 $(CFLAGS)
#WARN_CFLAGS = -W -Wall
# These exists to be overridden by the x-* and t-* files, respectively.
! X_CFLAGS =
T_CFLAGS =
X_CPPFLAGS =
--- 74,80 ----
BOOT_CFLAGS = -O2 $(CFLAGS)
#WARN_CFLAGS = -W -Wall
# These exists to be overridden by the x-* and t-* files, respectively.
! X_CFLAGS = $(NIX_EXTRA_CFLAGS) $(NIX_EXTRA_LDFLAGS)
T_CFLAGS =
X_CPPFLAGS =
***************
*** 218,224 ****
&& [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
# Dir to search for system headers. Overridden by cross-make.
! SYSTEM_HEADER_DIR = /usr/include
# Control whether to run fixproto.
STMP_FIXPROTO = stmp-fixproto
--- 218,228 ----
&& [ -f /usr/bin/ranlib -o -f /bin/ranlib ] )
# Dir to search for system headers. Overridden by cross-make.
! # 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.
! SYSTEM_HEADER_DIR = $(NIX_FIXINC_DUMMY)
# Control whether to run fixproto.
STMP_FIXPROTO = stmp-fixproto
diff -rc gcc-orig/Makefile.in gcc-2.95.3/Makefile.in
*** gcc-orig/Makefile.in 1999-06-23 00:44:42.000000000 +0200
--- gcc-2.95.3/Makefile.in 2004-08-03 10:46:42.000000000 +0200
***************
*** 87,94 ****
CXXFLAGS = -g -O2
LIBCFLAGS = $(CFLAGS)
! CFLAGS_FOR_TARGET = $(CFLAGS)
! LDFLAGS_FOR_TARGET =
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
PICFLAG =
PICFLAG_FOR_TARGET =
--- 87,94 ----
CXXFLAGS = -g -O2
LIBCFLAGS = $(CFLAGS)
! CFLAGS_FOR_TARGET = $(CFLAGS) $(NIX_EXTRA_CFLAGS)
! LDFLAGS_FOR_TARGET = $(NIX_EXTRA_LDFLAGS)
LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARGET)
PICFLAG =
PICFLAG_FOR_TARGET =
***************
*** 99,105 ****
# Use -O2 to stress test the compiler.
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
RANLIB = ranlib
--- 99,105 ----
# Use -O2 to stress test the compiler.
LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates
! CXXFLAGS_FOR_TARGET = $(CXXFLAGS) $(NIX_EXTRA_CFLAGS)
LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates
RANLIB = ranlib

View File

@@ -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

View File

@@ -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";
};
}

View File

@@ -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

View File

@@ -1,83 +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_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
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 "$staticCompiler"; then
if test -z "$profiledCompiler"; then
buildFlags="bootstrap $buildFlags"
else
buildFlags="profiledbootstrap $buildFlags"
fi
fi
genericBuild

View File

@@ -1,71 +0,0 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langFortran ? false
, profiledCompiler ? false
, staticCompiler ? false
, gmp ? null
, mpfr ? null
, texinfo ? null
, name ? "gcc"
}:
assert langC || langFortran;
with stdenv.lib;
stdenv.mkDerivation {
name = "${name}-4.1.2";
builder = ./builder.sh;
src =
optional /*langC*/ true (fetchurl {
url = mirror://gnu/gcc/gcc-4.1.2/gcc-core-4.1.2.tar.bz2;
sha256 = "07binc1hqlr0g387zrg5sp57i12yzd5ja2lgjb83bbh0h3gwbsbv";
}) ++
optional /*langCC*/ true (fetchurl {
url = mirror://gnu/gcc/gcc-4.1.2/gcc-g++-4.1.2.tar.bz2;
sha256 = "1qm2izcxna10jai0v4s41myki0xkw9174qpl6k1rnrqhbx0sl1hc";
}) ++
optional langFortran (fetchurl {
url = mirror://gnu/gcc/gcc-4.1.2/gcc-fortran-4.1.2.tar.bz2;
sha256 = "0772dhmm4gc10420h0d0mfkk2sirvjmjxz8j0ywm8wp5qf8vdi9z";
});
patches =
optional noSysDirs [./no-sys-dirs.patch];
inherit noSysDirs profiledCompiler staticCompiler;
buildInputs = [gmp mpfr texinfo];
enableParallelBuilding = true;
configureFlags = "
--disable-multilib
--disable-libstdcxx-pch
--with-system-zlib
--enable-languages=${
concatStrings (intersperse ","
( optional langC "c"
++ optional langCC "c++"
++ optional langFortran "fortran"
)
)
}
${if stdenv.isi686 then "--with-arch=i686" else ""}
";
makeFlags = if staticCompiler then "LDFLAGS=-static" else "";
passthru = { inherit langC langCC langFortran; };
meta = {
homepage = "http://gcc.gnu.org/";
license = "GPL/LGPL";
description = "GNU Compiler Collection, 4.1.x";
# Give the real GCC a lower priority than the GCC wrapper so that
# both can be installed at the same time.
priority = "7";
};
}

View File

@@ -1,177 +0,0 @@
diff -rc gcc-4.1.2-orig/Makefile.in gcc-4.1.2/Makefile.in
*** gcc-4.1.2-orig/Makefile.in Tue Apr 4 23:03:05 2006
--- gcc-4.1.2/Makefile.in Wed May 23 11:35:41 2007
***************
*** 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) \
***************
*** 352,357 ****
--- 353,366 ----
@host_makefile_frag@
###
+ CFLAGS += $(NIX_EXTRA_CFLAGS)
+ CPPFLAGS_FOR_TARGET += $(NIX_EXTRA_CFLAGS)
+ CXXFLAGS += $(NIX_EXTRA_CFLAGS)
+ LDFLAGS += $(NIX_EXTRA_LDFLAGS)
+ LDFLAGS_FOR_TARGET += $(NIX_EXTRA_LDFLAGS)
+ 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)$(HOST_LIB_PATH_gcc)
diff -rc gcc-4.1.2-orig/gcc/Makefile.in gcc-4.1.2/gcc/Makefile.in
*** gcc-4.1.2-orig/gcc/Makefile.in Wed Nov 1 15:40:44 2006
--- gcc-4.1.2/gcc/Makefile.in Wed May 23 11:35:41 2007
***************
*** 383,389 ****
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@
--- 383,393 ----
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@
***************
*** 3007,3013 ****
-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@
--- 3011,3017 ----
-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@
diff -rc gcc-4.1.2-orig/gcc/cppdefault.c gcc-4.1.2/gcc/cppdefault.c
*** gcc-4.1.2-orig/gcc/cppdefault.c Sat Jun 25 04:02:01 2005
--- gcc-4.1.2/gcc/cppdefault.c Wed May 23 11:35:41 2007
***************
*** 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.1.2-orig/gcc/gcc.c gcc-4.1.2/gcc/gcc.c
*** gcc-4.1.2-orig/gcc/gcc.c Tue Nov 7 15:26:21 2006
--- gcc-4.1.2/gcc/gcc.c Wed May 23 11:35:41 2007
***************
*** 1435,1444 ****
/* Default prefixes to attach to command names. */
#ifndef STANDARD_STARTFILE_PREFIX_1
! #define STANDARD_STARTFILE_PREFIX_1 "/lib/"
#endif
#ifndef STANDARD_STARTFILE_PREFIX_2
! #define STANDARD_STARTFILE_PREFIX_2 "/usr/lib/"
#endif
#ifdef CROSS_COMPILE /* Don't use these prefixes for a cross compiler. */
--- 1435,1444 ----
/* Default prefixes to attach to command names. */
#ifndef STANDARD_STARTFILE_PREFIX_1
! #define STANDARD_STARTFILE_PREFIX_1 ""
#endif
#ifndef STANDARD_STARTFILE_PREFIX_2
! #define STANDARD_STARTFILE_PREFIX_2 ""
#endif
#ifdef CROSS_COMPILE /* Don't use these prefixes for a cross compiler. */
***************
*** 1459,1466 ****
#endif
static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
! 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 *md_exec_prefix = MD_EXEC_PREFIX;
static const char *md_startfile_prefix = MD_STARTFILE_PREFIX;
--- 1459,1466 ----
#endif
static const char *const standard_exec_prefix = STANDARD_EXEC_PREFIX;
! 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;
diff -rc gcc-4.1.2-orig/ltcf-cxx.sh gcc-4.1.2/ltcf-cxx.sh
*** gcc-4.1.2-orig/ltcf-cxx.sh Sat Jul 16 04:30:53 2005
--- gcc-4.1.2/ltcf-cxx.sh Wed May 23 11:35:41 2007
***************
*** 989,995 ****
# the conftest object file.
pre_test_object_deps_done=no
! for p in `eval $output_verbose_link_cmd`; do
case $p in
--- 989,995 ----
# the conftest object file.
pre_test_object_deps_done=no
! for p in `true`; do
case $p in
diff -rc gcc-4.1.2-orig/ltconfig gcc-4.1.2/ltconfig
*** gcc-4.1.2-orig/ltconfig Tue Jul 4 22:30:34 2006
--- gcc-4.1.2/ltconfig Wed May 23 11:35:41 2007
***************
*** 2322,2327 ****
--- 2322,2332 ----
# 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_CFLAGS $NIX_EXTRA_LDFLAGS"
+
# Is the compiler the GNU C compiler?
with_gcc=$with_gcc

View File

@@ -47,9 +47,9 @@ let
" --enable-threads=posix" +
" --enable-nls"
);
stageNameAddon = if (crossStageStatic) then "-stage-static" else
stageNameAddon = if crossStageStatic then "-stage-static" else
"-stage-final";
crossNameAddon = if (cross != null) then "-${cross.config}" + stageNameAddon else "";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
in
stdenv.mkDerivation ({
@@ -76,7 +76,7 @@ stdenv.mkDerivation ({
});
patches =
[./pass-cxxcpp.patch ./libmudflap-cpp.patch]
[ ./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
@@ -85,7 +85,7 @@ stdenv.mkDerivation ({
inherit noSysDirs profiledCompiler staticCompiler crossStageStatic
binutilsCross libcCross;
targetConfig = if (cross != null) then cross.config else null;
targetConfig = if cross != null then cross.config else null;
buildInputs = [texinfo gmp mpfr]
++ (optionals langTreelang [bison flex])
@@ -129,7 +129,7 @@ stdenv.mkDerivation ({
enableMultilib; };
# ghdl does not build fine with parallel building
enableParallelBuilding = if langVhdl then false else true;
enableParallelBuilding = !langVhdl;
meta = {
homepage = "http://gcc.gnu.org/";

View File

@@ -0,0 +1,174 @@
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

@@ -84,9 +84,9 @@ let version = "4.4.6";
" --enable-nls" +
" --disable-decimal-float" # No final libdecnumber (it may work only in 386)
);
stageNameAddon = if (crossStageStatic) then "-stage-static" else
stageNameAddon = if crossStageStatic then "-stage-static" else
"-stage-final";
crossNameAddon = if (cross != null) then "-${cross.config}" + stageNameAddon else "";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
in
@@ -104,16 +104,19 @@ stdenv.mkDerivation ({
};
patches =
[./pass-cxxcpp.patch
[ ./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
# 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
]
# 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.
@@ -124,7 +127,7 @@ stdenv.mkDerivation ({
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
libcCross;
buildNativeInputs = [ texinfo which ];
nativeBuildInputs = [ texinfo which ];
buildInputs = [ gmp mpfr gettext ]
++ (optional (ppl != null) ppl)
@@ -163,11 +166,11 @@ stdenv.mkDerivation ({
)
}
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" 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;
targetConfig = if cross != null then cross.config else null;
# Needed for the cross compilation to work
AR = "ar";
@@ -189,13 +192,13 @@ stdenv.mkDerivation ({
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
${if cloogppl != null then "--with-cloog=${cloogppl.hostDrv}" else ""}
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
${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.hostDrv}" else ""}
--with-gmp=${gmp.hostDrv}
--with-mpfr=${mpfr.hostDrv}
${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
@@ -211,7 +214,7 @@ stdenv.mkDerivation ({
)
}
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
--target=${stdenv.cross.config}
";
@@ -243,7 +246,7 @@ stdenv.mkDerivation ({
enableMultilib version; };
# ghdl does not build fine with parallel building
enableParallelBuilding = if langVhdl then false else true;
enableParallelBuilding = !langVhdl;
meta = {
homepage = http://gcc.gnu.org/;

View File

@@ -0,0 +1,174 @@
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

@@ -78,7 +78,7 @@ let version = "4.5.4";
withArch +
withCpu +
withAbi +
(if (crossMingw && crossStageStatic) then
(if crossMingw && crossStageStatic then
" --with-headers=${libcCross}/include" +
" --with-gcc" +
" --with-gnu-as" +
@@ -115,9 +115,9 @@ let version = "4.5.4";
" --enable-nls" +
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
);
stageNameAddon = if (crossStageStatic) then "-stage-static" else
stageNameAddon = if crossStageStatic then "-stage-static" else
"-stage-final";
crossNameAddon = if (cross != null) then "-${cross.config}" + stageNameAddon else "";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
in
@@ -146,7 +146,7 @@ stdenv.mkDerivation ({
postPatch =
if (stdenv.system == "i586-pc-gnu"
|| (libcCross != null # e.g., building `gcc.hostDrv'
|| (libcCross != null # e.g., building `gcc.crossDrv'
&& libcCross ? crossConfig
&& libcCross.crossConfig == "i586-pc-gnu")
|| (cross != null && cross.config == "i586-pc-gnu"
@@ -189,7 +189,7 @@ stdenv.mkDerivation ({
# On NixOS, use the right path to the dynamic linker instead of
# `/lib/ld*.so'.
let
libc = if (libcCross != null) then libcCross else stdenv.gcc.libc;
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
in
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@@ -205,7 +205,7 @@ stdenv.mkDerivation ({
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
libcCross crossMingw;
buildNativeInputs = [ texinfo which ]
nativeBuildInputs = [ texinfo which ]
++ optional (perl != null) perl;
buildInputs = [ gmp mpfr mpc libelf gettext ]
@@ -237,7 +237,7 @@ stdenv.mkDerivation ({
--with-gmp=${gmp}
--with-mpfr=${mpfr}
--with-mpc=${mpc}
${if (libelf != null) then "--with-libelf=${libelf}" else ""}
${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
@@ -255,11 +255,11 @@ stdenv.mkDerivation ({
${ # Trick that should be taken out once we have a mips64el-linux not loongson2f
if cross == null && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""}
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" 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;
targetConfig = if cross != null then cross.config else null;
crossAttrs = {
AR = "${stdenv.cross.config}-ar";
@@ -277,13 +277,13 @@ stdenv.mkDerivation ({
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
${if cloogppl != null then "--with-cloog=${cloogppl.hostDrv}" else ""}
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
${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.hostDrv}" else ""}
--with-gmp=${gmp.hostDrv}
--with-mpfr=${mpfr.hostDrv}
${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
@@ -299,7 +299,7 @@ stdenv.mkDerivation ({
)
}
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
--target=${stdenv.cross.config}
'';
@@ -391,7 +391,7 @@ stdenv.mkDerivation ({
// optionalAttrs (cross != null || libcCross != null) {
# `builder.sh' sets $CPP, which leads configure to use "gcc -E" instead of,
# say, "i586-pc-gnu-gcc -E" when building `gcc.hostDrv'.
# say, "i586-pc-gnu-gcc -E" when building `gcc.crossDrv'.
# FIXME: Fix `builder.sh' directly in the next stdenv-update.
postUnpack = "unset CPP";
}

View File

@@ -196,6 +196,15 @@ postConfigure() {
}
preInstall() {
# Make lib64 a symlink to lib.
if [ -n "$is64bit" -a -z "$enableMultilib" ]; then
mkdir -p $out/lib
ln -s lib $out/lib64
fi
}
postInstall() {
# Remove precompiled headers for now. They are very big and
# probably not very useful yet.
@@ -234,13 +243,4 @@ postInstall() {
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

@@ -51,7 +51,10 @@ let version = "4.6.3";
# Whether building a cross-compiler for GNU/Hurd.
crossGNU = cross != null && cross.config == "i586-pc-gnu";
patches = [ ]
patches =
[ # Fix building on Glibc 2.16.
./siginfo_t_fix.patch
]
++ optional (cross != null) ./libstdc++-target.patch
++ optional noSysDirs ./no-sys-dirs.patch
# The GNAT Makefiles did not pay attention to CFLAGS_FOR_TARGET for its
@@ -84,71 +87,95 @@ let version = "4.6.3";
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 "";
crossMingw = (cross != null && cross.libc == "msvcrt");
/* Platform flags */
platformFlags = let
gccArch = stdenv.lib.attrByPath [ "platform" "gcc" "arch" ] null stdenv;
gccCpu = stdenv.lib.attrByPath [ "platform" "gcc" "cpu" ] null stdenv;
gccAbi = stdenv.lib.attrByPath [ "platform" "gcc" "abi" ] null stdenv;
gccFpu = stdenv.lib.attrByPath [ "platform" "gcc" "fpu" ] null stdenv;
gccFloat = stdenv.lib.attrByPath [ "platform" "gcc" "float" ] null stdenv;
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 "";
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
in
(withArch +
withCpu +
withAbi +
withFpu +
withFloat);
crossConfigureFlags =
"--target=${cross.config}" +
withArch +
withCpu +
withAbi +
(if (crossMingw && crossStageStatic) then
" --with-headers=${libcCross}/include" +
" --with-gcc" +
" --with-gnu-as" +
" --with-gnu-ld" +
" --with-gnu-ld" +
" --disable-shared" +
" --disable-nls" +
" --disable-debug" +
" --enable-sjlj-exceptions" +
" --enable-threads=win32" +
" --disable-win32-registry"
else if crossStageStatic then
" --disable-libssp --disable-nls" +
" --without-headers" +
" --disable-threads " +
" --disable-libmudflap " +
" --disable-libgomp " +
" --disable-libquadmath" +
" --disable-shared" +
" --disable-decimal-float" # libdecnumber requires libc
else
" --with-headers=${libcCross}/include" +
" --enable-__cxa_atexit" +
" --enable-long-long" +
(if crossMingw then
" --enable-threads=win32" +
" --enable-sjlj-exceptions" +
" --enable-hash-synchronization" +
" --disable-libssp" +
" --disable-nls" +
" --with-dwarf2" +
# I think noone uses shared gcc libs in mingw, so we better do the same.
# In any case, mingw32 g++ linking is broken by default with shared libs,
# unless adding "-lsupc++" to any linking command. I don't know why.
/* Cross-gcc settings */
crossMingw = (cross != null && cross.libc == "msvcrt");
crossConfigureFlags = let
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
gccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] 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 "";
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
in
"--target=${cross.config}" +
withArch +
withCpu +
withAbi +
withFpu +
(if crossMingw && crossStageStatic then
" --with-headers=${libcCross}/include" +
" --with-gcc" +
" --with-gnu-as" +
" --with-gnu-ld" +
" --with-gnu-ld" +
" --disable-shared" +
(if cross.config == "x86_64-w64-mingw32" then
# To keep ABI compatibility with upstream mingw-w64
" --enable-fully-dynamic-string"
else "")
else (if cross.libc == "uclibc" then
# In uclibc cases, libgomp needs an additional '-ldl'
# and as I don't know how to pass it, I disable libgomp.
" --disable-libgomp" else "") +
" --enable-threads=posix" +
" --enable-nls" +
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
);
stageNameAddon = if (crossStageStatic) then "-stage-static" else
" --disable-nls" +
" --disable-debug" +
" --enable-sjlj-exceptions" +
" --enable-threads=win32" +
" --disable-win32-registry"
else if crossStageStatic then
" --disable-libssp --disable-nls" +
" --without-headers" +
" --disable-threads " +
" --disable-libmudflap " +
" --disable-libgomp " +
" --disable-libquadmath" +
" --disable-shared" +
" --disable-decimal-float" # libdecnumber requires libc
else
" --with-headers=${libcCross}/include" +
" --enable-__cxa_atexit" +
" --enable-long-long" +
(if crossMingw then
" --enable-threads=win32" +
" --enable-sjlj-exceptions" +
" --enable-hash-synchronization" +
" --disable-libssp" +
" --disable-nls" +
" --with-dwarf2" +
# I think noone uses shared gcc libs in mingw, so we better do the same.
# In any case, mingw32 g++ linking is broken by default with shared libs,
# unless adding "-lsupc++" to any linking command. I don't know why.
" --disable-shared" +
(if cross.config == "x86_64-w64-mingw32" then
# To keep ABI compatibility with upstream mingw-w64
" --enable-fully-dynamic-string"
else "")
else (if cross.libc == "uclibc" then
# In uclibc cases, libgomp needs an additional '-ldl'
# and as I don't know how to pass it, I disable libgomp.
" --disable-libgomp" else "") +
" --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 "";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips;
in
@@ -165,11 +192,11 @@ stdenv.mkDerivation ({
inherit langC langCC langFortran langJava langAda langGo;
};
inherit patches;
inherit patches enableMultilib;
postPatch =
if (stdenv.isGNU
|| (libcCross != null # e.g., building `gcc.hostDrv'
|| (libcCross != null # e.g., building `gcc.crossDrv'
&& libcCross ? crossConfig
&& libcCross.crossConfig == "i586-pc-gnu")
|| (crossGNU && libcCross != null))
@@ -211,7 +238,7 @@ stdenv.mkDerivation ({
# On NixOS, use the right path to the dynamic linker instead of
# `/lib/ld*.so'.
let
libc = if (libcCross != null) then libcCross else stdenv.gcc.libc;
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
in
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@@ -224,10 +251,10 @@ stdenv.mkDerivation ({
''
else null;
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;
buildNativeInputs = [ texinfo which gettext ]
nativeBuildInputs = [ texinfo which gettext ]
++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig);
@@ -270,7 +297,7 @@ stdenv.mkDerivation ({
--with-gmp=${gmp}
--with-mpfr=${mpfr}
--with-mpc=${mpc}
${if (libelf != null) then "--with-libelf=${libelf}" else ""}
${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
@@ -286,14 +313,18 @@ stdenv.mkDerivation ({
)
)
}
${ # Trick that should be taken out once we have a mips64el-linux not loongson2f
if cross == null && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""}
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
${if cross == null then platformFlags else ""}
";
targetConfig = if (cross != null) then cross.config else null;
targetConfig = if cross != null then cross.config else null;
buildFlags = if bootstrap then
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
installTargets =
if stripped
@@ -317,13 +348,13 @@ stdenv.mkDerivation ({
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
${if cloog != null then "--with-cloog=${cloog.hostDrv} --enable-cloog-backend=isl" else ""}
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" 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.hostDrv}" else ""}
--with-gmp=${gmp.hostDrv}
--with-mpfr=${mpfr.hostDrv}
${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
@@ -340,10 +371,11 @@ stdenv.mkDerivation ({
)
}
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
--target=${stdenv.cross.config}
'';
buildFlags = "";
};
@@ -399,10 +431,12 @@ stdenv.mkDerivation ({
else null;
passthru = { inherit langC langCC langAda langFortran langVhdl
langGo enableMultilib version; };
langGo version; };
enableParallelBuilding = true;
inherit (stdenv) is64bit;
meta = {
homepage = http://gcc.gnu.org/;
license = "GPLv3+"; # runtime support libraries are typically LGPLv3+

View File

@@ -0,0 +1,211 @@
Partly taken from:
http://gcc.gnu.org/git/?p=gcc.git;a=patch;h=5617a3db5d04630d0bfb71a3578894b4442f266d
Adapted to gcc 4.6.3. Original commit text follows.
From 5617a3db5d04630d0bfb71a3578894b4442f266d Mon Sep 17 00:00:00 2001
From: tschwinge <tschwinge@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Fri, 20 Apr 2012 07:44:50 +0000
Subject: [PATCH] struct siginfo vs. siginfo_t
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/trunk@186610 138bc75d-0d04-0410-961f-82ee72b054a4
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
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for Alpha Linux.
- Copyright (C) 2004, 2005, 2009, 2011 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2009, 2011, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -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
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for Blackfin.
- Copyright (C) 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -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 ad0ccfa..02b1897 100644
--- a/gcc/config/i386/linux-unwind.h
+++ b/gcc/config/i386/linux-unwind.h
@@ -136,9 +136,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
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for IA64 Linux.
- Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -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
@@ -1,5 +1,6 @@
/* DWARF2 EH unwinding support for MIPS Linux.
- Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2012 Free Software
+ Foundation, Inc.
This file is part of GCC.
@@ -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
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for PA Linux.
- Copyright (C) 2004, 2005, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2009, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -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
@@ -1,5 +1,6 @@
/* DWARF2 EH unwinding support for SH Linux.
- Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005, 2006, 2007, 2009, 2012 Free Software Foundation,
+ Inc.
This file is part of GCC.
@@ -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
@@ -1,5 +1,5 @@
/* DWARF2 EH unwinding support for Xtensa.
- Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2009, 2012 Free Software Foundation, Inc.
This file is part of GCC.
@@ -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.3.4

View File

@@ -71,7 +71,7 @@ if test "$noSysDirs" = "1"; then
unset CPATH
if test -z "$crossStageStatic"; then
EXTRA_TARGET_CFLAGS="-B${libcCross}/lib -idirafter ${libcCross}/include"
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib"
EXTRA_TARGET_LDFLAGS="-Wl,-L${libcCross}/lib -Wl,-rpath,${libcCross}/lib -Wl,-rpath-link,${libcCross}/lib"
fi
else
if test -z "$NIX_GCC_CROSS"; then
@@ -95,7 +95,9 @@ if test "$noSysDirs" = "1"; then
NIX_FIXINC_DUMMY_CROSS=$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/include
# The path to the Glibc binaries such as `crti.o'.
glibc_libdir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)/lib"
glibc_dir="$(cat $NIX_GCC_CROSS/nix-support/orig-libc)"
glibc_libdir="$glibc_dir/lib"
configureFlags="$configureFlags --with-native-system-header-dir=$glibc_dir/include"
extraFlags="-I$NIX_FIXINC_DUMMY_CROSS $extraFlags"
extraLDFlags="-L$glibc_libdir -rpath $glibc_libdir $extraLDFlags"
@@ -237,13 +239,4 @@ postInstall() {
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

@@ -85,74 +85,104 @@ let version = "4.7.2";
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;
gccMode = stdenv.lib.attrByPath [ "gcc" "mode" ] 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 "";
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
crossMingw = (cross != null && cross.libc == "msvcrt");
/* Platform flags */
platformFlags = let
gccArch = stdenv.lib.attrByPath [ "platform" "gcc" "arch" ] null stdenv;
gccCpu = stdenv.lib.attrByPath [ "platform" "gcc" "cpu" ] null stdenv;
gccAbi = stdenv.lib.attrByPath [ "platform" "gcc" "abi" ] null stdenv;
gccFpu = stdenv.lib.attrByPath [ "platform" "gcc" "fpu" ] null stdenv;
gccFloat = stdenv.lib.attrByPath [ "platform" "gcc" "float" ] null stdenv;
gccMode = stdenv.lib.attrByPath [ "platform" "gcc" "mode" ] null stdenv;
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 "";
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
in
(withArch +
withCpu +
withAbi +
withFpu +
withFloat +
withMode);
crossConfigureFlags =
"--target=${cross.config}" +
withArch +
withCpu +
withAbi +
withMode +
(if (crossMingw && crossStageStatic) then
" --with-headers=${libcCross}/include" +
" --with-gcc" +
" --with-gnu-as" +
" --with-gnu-ld" +
" --with-gnu-ld" +
" --disable-shared" +
" --disable-nls" +
" --disable-debug" +
" --enable-sjlj-exceptions" +
" --enable-threads=win32" +
" --disable-win32-registry"
else if crossStageStatic then
" --disable-libssp --disable-nls" +
" --without-headers" +
" --disable-threads " +
" --disable-libmudflap " +
" --disable-libgomp " +
" --disable-libquadmath" +
" --disable-shared" +
" --disable-decimal-float" # libdecnumber requires libc
else
" --with-headers=${libcCross}/include" +
" --enable-__cxa_atexit" +
" --enable-long-long" +
(if crossMingw then
" --enable-threads=win32" +
" --enable-sjlj-exceptions" +
" --enable-hash-synchronization" +
" --disable-libssp" +
" --disable-nls" +
" --with-dwarf2" +
# I think noone uses shared gcc libs in mingw, so we better do the same.
# In any case, mingw32 g++ linking is broken by default with shared libs,
# unless adding "-lsupc++" to any linking command. I don't know why.
/* Cross-gcc settings */
crossMingw = (cross != null && cross.libc == "msvcrt");
crossConfigureFlags = let
gccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null cross;
gccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null cross;
gccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null cross;
gccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] null cross;
gccFloat = stdenv.lib.attrByPath [ "gcc" "float" ] null cross;
gccMode = stdenv.lib.attrByPath [ "gcc" "mode" ] 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 "";
withFpu = if gccFpu != null then " --with-fpu=${gccFpu}" else "";
withFloat = if gccFloat != null then " --with-float=${gccFloat}" else "";
withMode = if gccMode != null then " --with-mode=${gccMode}" else "";
in
"--target=${cross.config}" +
withArch +
withCpu +
withAbi +
withFpu +
withFloat +
withMode +
(if crossMingw && crossStageStatic then
" --with-headers=${libcCross}/include" +
" --with-gcc" +
" --with-gnu-as" +
" --with-gnu-ld" +
" --with-gnu-ld" +
" --disable-shared" +
(if cross.config == "x86_64-w64-mingw32" then
# To keep ABI compatibility with upstream mingw-w64
" --enable-fully-dynamic-string"
else "")
else (if cross.libc == "uclibc" then
# In uclibc cases, libgomp needs an additional '-ldl'
# and as I don't know how to pass it, I disable libgomp.
" --disable-libgomp" else "") +
" --enable-threads=posix" +
" --enable-nls" +
" --disable-decimal-float") # No final libdecnumber (it may work only in 386)
);
stageNameAddon = if (crossStageStatic) then "-stage-static" else
" --disable-nls" +
" --disable-debug" +
" --enable-sjlj-exceptions" +
" --enable-threads=win32" +
" --disable-win32-registry"
else if crossStageStatic then
" --disable-libssp --disable-nls" +
" --without-headers" +
" --disable-threads " +
" --disable-libmudflap " +
" --disable-libgomp " +
" --disable-libquadmath" +
" --disable-shared" +
" --disable-decimal-float" # libdecnumber requires libc
else
" --with-headers=${libcCross}/include" +
" --enable-__cxa_atexit" +
" --enable-long-long" +
(if crossMingw then
" --enable-threads=win32" +
" --enable-sjlj-exceptions" +
" --enable-hash-synchronization" +
" --disable-libssp" +
" --disable-nls" +
" --with-dwarf2" +
# I think noone uses shared gcc libs in mingw, so we better do the same.
# In any case, mingw32 g++ linking is broken by default with shared libs,
# unless adding "-lsupc++" to any linking command. I don't know why.
" --disable-shared" +
(if cross.config == "x86_64-w64-mingw32" then
# To keep ABI compatibility with upstream mingw-w64
" --enable-fully-dynamic-string"
else "")
else (if cross.libc == "uclibc" then
# In uclibc cases, libgomp needs an additional '-ldl'
# and as I don't know how to pass it, I disable libgomp.
" --disable-libgomp" else "") +
" --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 "";
crossNameAddon = if cross != null then "-${cross.config}" + stageNameAddon else "";
bootstrap = cross == null && !stdenv.isArm && !stdenv.isMips;
in
@@ -173,7 +203,7 @@ stdenv.mkDerivation ({
postPatch =
if (stdenv.isGNU
|| (libcCross != null # e.g., building `gcc.hostDrv'
|| (libcCross != null # e.g., building `gcc.crossDrv'
&& libcCross ? crossConfig
&& libcCross.crossConfig == "i586-pc-gnu")
|| (crossGNU && libcCross != null))
@@ -212,7 +242,7 @@ stdenv.mkDerivation ({
# On NixOS, use the right path to the dynamic linker instead of
# `/lib/ld*.so'.
let
libc = if (libcCross != null) then libcCross else stdenv.gcc.libc;
libc = if libcCross != null then libcCross else stdenv.gcc.libc;
in
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
@@ -225,10 +255,10 @@ stdenv.mkDerivation ({
''
else null;
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
inherit noSysDirs staticCompiler langJava crossStageStatic
libcCross crossMingw;
buildNativeInputs = [ texinfo which gettext ]
nativeBuildInputs = [ texinfo which gettext ]
++ (optional (perl != null) perl)
++ (optional javaAwtGtk pkgconfig);
@@ -275,7 +305,7 @@ stdenv.mkDerivation ({
--with-gmp=${gmp}
--with-mpfr=${mpfr}
--with-mpc=${mpc}
${if (libelf != null) then "--with-libelf=${libelf}" else ""}
${if libelf != null then "--with-libelf=${libelf}" else ""}
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
@@ -294,21 +324,36 @@ stdenv.mkDerivation ({
${if (stdenv ? glibc && cross == null)
then " --with-native-system-header-dir=${stdenv.glibc}/include"
else ""}
${ # Trick that should be taken out once we have a mips64el-linux not loongson2f
if cross == null && stdenv.system == "mips64el-linux" then "--with-arch=loongson2f" else ""}
${if langAda then " --enable-libada" else ""}
${if (cross == null && stdenv.isi686) then "--with-arch=i686" else ""}
${if cross == null && stdenv.isi686 then "--with-arch=i686" else ""}
${if cross != null then crossConfigureFlags else ""}
${if !bootstrap then "--disable-bootstrap" else ""}
${if cross == null then platformFlags else ""}
";
targetConfig = if (cross != null) then cross.config else null;
targetConfig = if cross != null then cross.config else null;
buildFlags = if bootstrap then
(if profiledCompiler then "profiledbootstrap" else "bootstrap")
else "";
installTargets =
if stripped
then "install-strip"
else "install";
crossAttrs = {
crossAttrs = let
xgccArch = stdenv.lib.attrByPath [ "gcc" "arch" ] null stdenv.cross;
xgccCpu = stdenv.lib.attrByPath [ "gcc" "cpu" ] null stdenv.cross;
xgccAbi = stdenv.lib.attrByPath [ "gcc" "abi" ] null stdenv.cross;
xgccFpu = stdenv.lib.attrByPath [ "gcc" "fpu" ] null stdenv.cross;
xgccFloat = stdenv.lib.attrByPath [ "gcc" "float" ] null stdenv.cross;
xwithArch = if xgccArch != null then " --with-arch=${xgccArch}" else "";
xwithCpu = if xgccCpu != null then " --with-cpu=${xgccCpu}" else "";
xwithAbi = if xgccAbi != null then " --with-abi=${xgccAbi}" else "";
xwithFpu = if xgccFpu != null then " --with-fpu=${xgccFpu}" else "";
xwithFloat = if xgccFloat != null then " --with-float=${xgccFloat}" else "";
in {
AR = "${stdenv.cross.config}-ar";
LD = "${stdenv.cross.config}-ld";
CC = "${stdenv.cross.config}-gcc";
@@ -324,13 +369,13 @@ stdenv.mkDerivation ({
configureFlags = ''
${if enableMultilib then "" else "--disable-multilib"}
${if enableShared then "" else "--disable-shared"}
${if ppl != null then "--with-ppl=${ppl.hostDrv}" else ""}
${if cloog != null then "--with-cloog=${cloog.hostDrv} --enable-cloog-backend=isl" else ""}
${if langJava then "--with-ecj-jar=${javaEcj.hostDrv}" else ""}
${if ppl != null then "--with-ppl=${ppl.crossDrv}" else ""}
${if cloog != null then "--with-cloog=${cloog.crossDrv} --enable-cloog-backend=isl" 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.hostDrv}" else ""}
--with-gmp=${gmp.hostDrv}
--with-mpfr=${mpfr.hostDrv}
${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
@@ -347,10 +392,14 @@ stdenv.mkDerivation ({
)
}
${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}
${xwithArch}
${xwithCpu}
${xwithAbi}
${xwithFpu}
${xwithFloat}
'';
buildFlags = "";
};

View File

@@ -3,12 +3,12 @@
stdenv.mkDerivation {
name = "gentoo-gnatboot-4.1";
src = if (stdenv.system == "i686-linux") then
src = if stdenv.system == "i686-linux" then
fetchurl {
url = "mirror://gentoo/distfiles/gnatboot-4.1-i386.tar.bz2";
sha256 = "0665zk71598204bf521vw68i5y6ccqarq9fcxsqp7ccgycb4lysr";
}
else if (stdenv.system == "x86_64-linux") then
else if stdenv.system == "x86_64-linux" then
fetchurl {
url = "mirror://gentoo/distfiles/gnatboot-4.1-amd64.tar.bz2";
sha256 = "1li4d52lmbnfs6llcshlbqyik2q2q4bvpir0f7n38nagp0h6j0d4";

View File

@@ -54,9 +54,9 @@ stdenv.mkDerivation {
patches = [ ./cacert.patch ];
GOOS = "linux";
GOARCH = if (stdenv.system == "i686-linux") then "386"
else if (stdenv.system == "x86_64-linux") then "amd64"
else if (stdenv.system == "armv5tel-linux") then "arm"
GOARCH = if stdenv.system == "i686-linux" then "386"
else if stdenv.system == "x86_64-linux" then "amd64"
else if stdenv.system == "armv5tel-linux" then "arm"
else throw "Unsupported system";
GOARM = stdenv.lib.optionalString (stdenv.system == "armv5tel-linux") "5";
@@ -74,7 +74,7 @@ stdenv.mkDerivation {
for a in go gofmt godoc; do
wrapProgram "$out/bin/$a" \
--set "GOROOT" $out/share/go \
${if (stdenv.system == "armv5tel-linux") then "--set GOARM $GOARM" else ""}
${if stdenv.system == "armv5tel-linux" then "--set GOARM $GOARM" else ""}
done
# Copy the emacs configuration for Go files.

View File

@@ -1,27 +1,28 @@
{stdenv, fetchurl, bison, flex}:
stdenv.mkDerivation {
name = "iasl-20120215";
name = "iasl-20130117";
src = fetchurl {
url = http://www.acpica.org/download/acpica-unix-20120215.tar.gz;
sha256 = "13avirbqdnp7whl6ji8ixkhzdwf1cadl5fg8ggzbxp99bx0rgd5j";
url = http://www.acpica.org/download/acpica-unix-20130117.tar.gz;
sha256 = "1zils7l7gnkbbl8916dlhvij1g625ryb7769zhzffn3flshfdivh";
};
buildPhase = "
cd source/compiler
make
cd ..
";
NIX_CFLAGS_COMPILE = "-O3";
installPhase = "
install -d $out/bin
install compiler/iasl $out/bin
";
buildFlags = "iasl";
buildInputs = [ bison flex ];
installPhase =
''
install -d $out/bin
install generate/unix/bin*/iasl $out/bin
'';
meta = {
description = "Intel ACPI Compiler";
homepage = http://www.acpica.org/;
license = "iasl"; # FIXME: is this a free software license?
};
}

View File

@@ -1,11 +1,12 @@
{stdenv, fetchurl, llvm, gmp, mpfr, mpc}:
stdenv.mkDerivation rec {
name = "dragonegg-3.0";
version = "3.2";
name = "dragonegg-${version}";
src = fetchurl {
url = "http://llvm.org/releases/3.0/${name}.tar.gz";
sha256 = "09v8bxx676iz93qk39dc2fk52iqhqy9pnphvinmm9ch1x791zpvj";
url = "http://llvm.org/releases/${version}/${name}.src.tar.gz";
sha256 = "0jfxhqy3177drlvzgp6m0kwnbfyzrd4vzidnxjhck8a7a69a26bg";
};
# The gcc the plugin will be built for (the same used building dragonegg)

View File

@@ -60,7 +60,7 @@ stdenv.mkDerivation {
$out/lib/mit-scheme${arch}
'';
buildNativeInputs = [ makeWrapper gnum4 texinfo texLive automake ];
nativeBuildInputs = [ makeWrapper gnum4 texinfo texLive automake ];
# XXX: The `check' target doesn't exist.
doCheck = false;

View File

@@ -21,7 +21,10 @@ rec {
configureFlags = [];
/* doConfigure should be removed if not needed */
phaseNames = ["setVars" "doFixNewer" "doFixTests" "setVersion" "doBuild" "doInstall" "doWrap"];
phaseNames = ["setVars" "doFixNewer" "doFixTests" "setVersion" "doPatch" "doBuild" "doInstall" "doWrap"];
patches = [ ./newglibc.patch ]; # https://bugs.launchpad.net/sbcl/+bug/1095036
patchFlags = "-p2";
setVars = a.fullDepEntry (''
export INSTALL_ROOT=$out

View File

@@ -0,0 +1,43 @@
Fixes for glibc 2.17.
linux-os.c is just a missing header (for personality()).
In x86-64-linux-os.c, __USE_GNU is a glibc-internal name that features.h
defines; _GNU_SOURCE is what it should actually be using to get GNU extensions.
diff -x config.log -x config.status -ru tmp/sbcl-1.1.2/src/runtime/linux-os.c work/sbcl-1.1.2/src/runtime/linux-os.c
--- tmp/sbcl-1.1.2/src/runtime/linux-os.c 2012-12-01 11:32:38.000000000 +0000
+++ work/sbcl-1.1.2/src/runtime/linux-os.c 2012-12-31 01:20:37.619000000 +0000
@@ -46,6 +46,7 @@
#include <sys/stat.h>
#include <unistd.h>
#include <linux/version.h>
+#include <sys/personality.h>
#include "validate.h"
#include "thread.h"
diff -x config.log -x config.status -ru tmp/sbcl-1.1.2/src/runtime/x86-64-linux-os.c work/sbcl-1.1.2/src/runtime/x86-64-linux-os.c
--- tmp/sbcl-1.1.2/src/runtime/x86-64-linux-os.c 2012-12-01 11:32:38.000000000 +0000
+++ work/sbcl-1.1.2/src/runtime/x86-64-linux-os.c 2012-12-31 01:20:25.450000000 +0000
@@ -14,6 +14,9 @@
* files for more information.
*/
+/* This is to get REG_RAX etc. from sys/ucontext.h. */
+#define _GNU_SOURCE
+
#include <stdio.h>
#include <stddef.h>
#include <sys/param.h>
@@ -21,11 +24,7 @@
#include <sys/types.h>
#include <unistd.h>
#include <errno.h>
-
-#define __USE_GNU
#include <sys/ucontext.h>
-#undef __USE_GNU
-
#include "./signal.h"
#include "os.h"

View File

@@ -11,7 +11,7 @@ let version = "0.9.25"; in
sha256 = "0dfycf80x73dz67c97j1ry29wrv35393ai5ry46i1x1fzfq6rv8v";
};
buildNativeInputs = [ perl texinfo ];
nativeBuildInputs = [ perl texinfo ];
patches =
[ (fetchurl {

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "0g71zq6dpqrw2f40wfzdf18fdw41ymr17laqniy2kr622hkxdi8w";
};
buildNativeInputs = [ yacc flex pkgconfig xz ];
nativeBuildInputs = [ yacc flex pkgconfig xz ];
buildInputs = [ glib ];

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "1n708n9ixyy9qrzyv1wf4ybvcclx43ib9ki028wwpvkz6kv8zqlb";
};
buildNativeInputs = [ yacc flex pkgconfig xz ];
nativeBuildInputs = [ yacc flex pkgconfig xz ];
buildInputs = [ glib ];

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "09i2s0dwmrk147ind2dx7nq845g12fp6fsjqrphhrr0dbi0zzgh3";
};
buildNativeInputs = [ yacc flex pkgconfig xz ];
nativeBuildInputs = [ yacc flex pkgconfig xz ];
buildInputs = [ glib ];

View File

@@ -0,0 +1,12 @@
diff -ru a/modules/bindings/glibc/linux.lisp b/modules/bindings/glibc/linux.lisp
--- a/modules/bindings/glibc/linux.lisp 2008-10-10 16:15:49.000000000 +0300
+++ b/modules/bindings/glibc/linux.lisp 2012-12-04 01:01:35.000000000 +0200
@@ -86,7 +86,7 @@
(def-c-type __key_t) ; int
-(c-lines "#include <bits/ipctypes.h>~%")
+(c-lines "#include <sys/ipc.h>~%")
(def-c-type __ipc_pid_t) ; ushort
; --------------------------- <sys/types.h> -----------------------------------

View File

@@ -18,14 +18,20 @@ stdenv.mkDerivation rec {
libXt pcre zlib libXpm xproto libXext xextproto libffi
libffcall
];
patches = [ ./bits_ipctypes_to_sys_ipc.patch ]; # from Gentoo
# First, replace port 9090 (rather low, can be used)
# with 64237 (much higher, IANA private area, not
# anything rememberable).
patchPhase = ''
# Also remove reference to a type that disappeared from recent glibc
# (seems the correct thing to do, found no reference to any solution)
postPatch = ''
sed -e 's@9090@64237@g' -i tests/socket.tst
sed -i 's@/bin/pwd@${coreutils}&@' src/clisp-link.in
find . -type f | xargs sed -e 's/-lICE/-lXau &/' -i
substituteInPlace modules/bindings/glibc/linux.lisp --replace "(def-c-type __swblk_t)" ""
'';
configureFlags =

View File

@@ -14,9 +14,9 @@ stdenv.mkDerivation rec {
# GCC 4.6 raises a number of set-but-unused warnings.
configureFlags = [ "--disable-error-on-warning" ];
buildNativeInputs = [ makeWrapper gawk ];
nativeBuildInputs = [ makeWrapper gawk ];
propagatedBuildInputs = [ readline gmp libtool ];
selfBuildNativeInput = true;
selfNativeBuildInput = true;
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"

View File

@@ -14,7 +14,7 @@
sha256 = "0f53pxkia4v17n0avwqlcjpy0n89hkazm2xsa6p84lv8k6k8y9vg";
};
buildNativeInputs = [ makeWrapper gawk pkgconfig ];
nativeBuildInputs = [ makeWrapper gawk pkgconfig ];
buildInputs = [ readline libtool libunistring libffi ];
propagatedBuildInputs = [ gmp boehmgc ]
@@ -25,13 +25,17 @@
++ [ libtool libunistring ];
# A native Guile 2.0 is needed to cross-build Guile.
selfBuildNativeInput = true;
selfNativeBuildInput = true;
enableParallelBuilding = true;
patches = [ ./disable-gc-sensitive-tests.patch ] ++
(stdenv.lib.optional (coverageAnalysis != null) ./gcov-file-name.patch);
# Explicitly link against libgcc_s, to work around the infamous
# "libgcc_s.so.1 must be installed for pthread_cancel to work".
LDFLAGS = "-lgcc_s";
postInstall = ''
wrapProgram $out/bin/guile-snarf --prefix PATH : "${gawk}/bin"

View File

@@ -1,6 +1,6 @@
{ stdenv, fetchurl, fetchgit, cmake, boost, libunwind, mysql, libmemcached, pcre
, libevent, gd, curl, libxml2, icu, flex, bison, openssl, zlib, php, re2c
, expat, libcap, oniguruma, libdwarf, libmcrypt, inteltbb, google_perftools
, expat, libcap, oniguruma, libdwarf, libmcrypt, inteltbb, gperftools
, bzip2, openldap, readline, libelf, uwimap, binutils, cyrus_sasl, pam
}:
assert stdenv.system == "x86_64-linux";
@@ -45,7 +45,7 @@ stdenv.mkDerivation {
buildInputs = [
cmake boost libunwind mysql libmemcached pcre libeventFB gd curlFB
libxml2_280 icu flex bison openssl zlib php expat libcap oniguruma
libdwarf libmcrypt inteltbb google_perftools bzip2 openldap readline
libdwarf libmcrypt inteltbb gperftools bzip2 openldap readline
libelf uwimap binutils cyrus_sasl pam
];
installPhase = ''

View File

@@ -3,10 +3,10 @@ libX11, graphicsmagick, pcre, liblapack, texLive, pkgconfig, mesa, fltk,
fftw, fftwSinglePrec, zlib, curl, qrupdate }:
stdenv.mkDerivation rec {
name = "octave-3.6.2";
name = "octave-3.6.3";
src = fetchurl {
url = "mirror://gnu/octave/${name}.tar.bz2";
sha256 = "1bn48ldhx585iyrylnz59b6mb3wlpvmz2i3ri8q75s5ys29rpdhb";
sha256 = "11i82vyf514rvdqcgdanw0ppvag8lcm6198rars0dd0w1xahjzg3";
};
buildInputs = [ gfortran readline ncurses perl flex texinfo qhull libX11

View File

@@ -12,7 +12,7 @@ stdenv.mkDerivation ({
license = "GPL-3";
};
} // (
if (config.octave.devVersion or false) then {
if config.octave.devVersion or false then {
name = "octave-hg"; # developement version mercurial repo
# REGION AUTO UPDATE: { name="octave"; type = "hg"; url = "http://www.octave.org/hg/octave"; }
src = sourceFromHead "octave-03b414516dd8.tar.gz"

View File

@@ -0,0 +1,63 @@
{ stdenv, fetchurl }:
let
libc = if stdenv.gcc.libc or null != null then stdenv.gcc.libc else "/usr";
in
stdenv.mkDerivation rec {
name = "perl-5.16.2";
src = fetchurl {
url = "mirror://cpan/src/${name}.tar.gz";
sha256 = "03nh8bqnjsdd5izjv3n2yfcxw4ck0llwww36jpbjbjgixwpqpy4f";
};
patches =
[ # Do not look in /usr etc. for dependencies.
./no-sys-dirs.patch
]
++ stdenv.lib.optional stdenv.isDarwin ./no-libutil.patch;
# Build a thread-safe Perl with a dynamic libperls.o. We need the
# "installstyle" option to ensure that modules are put under
# $out/lib/perl5 - this is the general default, but because $out
# contains the string "perl", Configure would select $out/lib.
# Miniperl needs -lm. perl needs -lrt.
configureFlags =
[ "-de"
"-Dcc=gcc"
"-Uinstallusrbinperl"
"-Dinstallstyle=lib/perl5"
"-Duseshrplib"
"-Dlocincpth=${libc}/include"
"-Dloclibpth=${libc}/lib"
]
++ stdenv.lib.optional (stdenv ? glibc) "-Dusethreads";
configureScript = "${stdenv.shell} ./Configure";
dontAddPrefix = true;
enableParallelBuilding = true;
preConfigure =
''
configureFlags="$configureFlags -Dprefix=$out -Dman1dir=$out/share/man/man1 -Dman3dir=$out/share/man/man3"
${stdenv.lib.optionalString stdenv.isArm ''
configureFlagsArray=(-Dldflags="-lm -lrt")
''}
'';
preBuild = stdenv.lib.optionalString (!(stdenv ? gcc && stdenv.gcc.nativeTools))
''
# Make Cwd work on NixOS (where we don't have a /bin/pwd).
substituteInPlace dist/Cwd/Cwd.pm --replace "'/bin/pwd'" "'$(type -tP pwd)'"
'';
setupHook = ./setup-hook.sh;
passthru.libPrefix = "lib/perl5/site_perl";
}

View File

@@ -0,0 +1,12 @@
diff -ru -x '*~' perl-5.14.2-orig/Configure perl-5.14.2/Configure
--- perl-5.14.2-orig/Configure 2011-09-26 11:44:34.000000000 +0200
+++ perl-5.14.2/Configure 2012-02-16 17:24:50.779839039 +0100
@@ -1368,7 +1368,7 @@
: List of libraries we want.
: If anyone needs extra -lxxx, put those in a hint file.
libswanted="sfio socket bind inet nsl nm ndbm gdbm dbm db malloc dl dld ld sun"
-libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
+libswanted="$libswanted m crypt sec c cposix posix ucb bsd BSD"
: We probably want to search /usr/shlib before most other libraries.
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`

View File

@@ -0,0 +1,152 @@
diff -ru -x '*~' perl-5.14.2-orig/Configure perl-5.14.2/Configure
--- perl-5.14.2-orig/Configure 2011-09-26 11:44:34.000000000 +0200
+++ perl-5.14.2/Configure 2012-01-20 17:05:23.089223129 +0100
@@ -106,15 +106,7 @@
fi
: Proper PATH setting
-paths='/bin /usr/bin /usr/local/bin /usr/ucb /usr/local /usr/lbin'
-paths="$paths /opt/bin /opt/local/bin /opt/local /opt/lbin"
-paths="$paths /usr/5bin /etc /usr/gnu/bin /usr/new /usr/new/bin /usr/nbin"
-paths="$paths /opt/gnu/bin /opt/new /opt/new/bin /opt/nbin"
-paths="$paths /sys5.3/bin /sys5.3/usr/bin /bsd4.3/bin /bsd4.3/usr/ucb"
-paths="$paths /bsd4.3/usr/bin /usr/bsd /bsd43/bin /opt/ansic/bin /usr/ccs/bin"
-paths="$paths /etc /usr/lib /usr/ucblib /lib /usr/ccs/lib"
-paths="$paths /sbin /usr/sbin /usr/libexec"
-paths="$paths /system/gnu_library/bin"
+paths=''
for p in $paths
do
@@ -1311,8 +1303,7 @@
archname=''
: Possible local include directories to search.
: Set locincpth to "" in a hint file to defeat local include searches.
-locincpth="/usr/local/include /opt/local/include /usr/gnu/include"
-locincpth="$locincpth /opt/gnu/include /usr/GNU/include /opt/GNU/include"
+locincpth=""
:
: no include file wanted by default
inclwanted=''
@@ -1328,17 +1319,12 @@
archobjs=''
libnames=''
: change the next line if compiling for Xenix/286 on Xenix/386
-xlibpth='/usr/lib/386 /lib/386'
+xlibpth=''
: Possible local library directories to search.
-loclibpth="/usr/local/lib /opt/local/lib /usr/gnu/lib"
-loclibpth="$loclibpth /opt/gnu/lib /usr/GNU/lib /opt/GNU/lib"
+loclibpth=""
: general looking path for locating libraries
-glibpth="/lib /usr/lib $xlibpth"
-glibpth="$glibpth /usr/ccs/lib /usr/ucblib /usr/local/lib"
-test -f /usr/shlib/libc.so && glibpth="/usr/shlib $glibpth"
-test -f /shlib/libc.so && glibpth="/shlib $glibpth"
-test -d /usr/lib64 && glibpth="$glibpth /lib64 /usr/lib64 /usr/local/lib64"
+glibpth=""
: Private path used by Configure to find libraries. Its value
: is prepended to libpth. This variable takes care of special
@@ -1371,8 +1357,6 @@
libswanted="$libswanted m crypt sec util c cposix posix ucb bsd BSD"
: We probably want to search /usr/shlib before most other libraries.
: This is only used by the lib/ExtUtils/MakeMaker.pm routine extliblist.
-glibpth=`echo " $glibpth " | sed -e 's! /usr/shlib ! !'`
-glibpth="/usr/shlib $glibpth"
: Do not use vfork unless overridden by a hint file.
usevfork=false
@@ -2380,7 +2364,6 @@
zip
"
pth=`echo $PATH | sed -e "s/$p_/ /g"`
-pth="$pth /lib /usr/lib"
for file in $loclist; do
eval xxx=\$$file
case "$xxx" in
@@ -4785,7 +4768,7 @@
: Set private lib path
case "$plibpth" in
'') if ./mips; then
- plibpth="$incpath/usr/lib /usr/local/lib /usr/ccs/lib"
+ plibpth="$incpath/usr/lib"
fi;;
esac
case "$libpth" in
@@ -8390,13 +8373,8 @@
echo " "
case "$sysman" in
'')
- syspath='/usr/share/man/man1 /usr/man/man1'
- syspath="$syspath /usr/man/mann /usr/man/manl /usr/man/local/man1"
- syspath="$syspath /usr/man/u_man/man1"
- syspath="$syspath /usr/catman/u_man/man1 /usr/man/l_man/man1"
- syspath="$syspath /usr/local/man/u_man/man1 /usr/local/man/l_man/man1"
- syspath="$syspath /usr/man/man.L /local/man/man1 /usr/local/man/man1"
- sysman=`./loc . /usr/man/man1 $syspath`
+ syspath=''
+ sysman=''
;;
esac
if $test -d "$sysman"; then
@@ -19721,9 +19699,10 @@
case "$full_ar" in
'') full_ar=$ar ;;
esac
+full_ar=ar
: Store the full pathname to the sed program for use in the C program
-full_sed=$sed
+full_sed=sed
: see what type gids are declared as in the kernel
echo " "
diff -ru -x '*~' perl-5.14.2-orig/ext/Errno/Errno_pm.PL perl-5.14.2/ext/Errno/Errno_pm.PL
--- perl-5.14.2-orig/ext/Errno/Errno_pm.PL 2011-09-26 11:44:34.000000000 +0200
+++ perl-5.14.2/ext/Errno/Errno_pm.PL 2012-01-20 17:02:07.938138311 +0100
@@ -137,11 +137,7 @@
if ($dep =~ /(\S+errno\.h)/) {
$file{$1} = 1;
}
- } elsif ($^O eq 'linux' &&
- $Config{gccversion} ne '' &&
- $Config{gccversion} !~ /intel/i
- # might be using, say, Intel's icc
- ) {
+ } elsif (0) {
# Some Linuxes have weird errno.hs which generate
# no #file or #line directives
my $linux_errno_h = -e '/usr/include/errno.h' ?
diff -ru -x '*~' perl-5.14.2-orig/hints/freebsd.sh perl-5.14.2/hints/freebsd.sh
--- perl-5.14.2-orig/hints/freebsd.sh 2011-09-19 15:18:22.000000000 +0200
+++ perl-5.14.2/hints/freebsd.sh 2012-01-20 17:10:37.267924044 +0100
@@ -118,21 +118,21 @@
objformat=`/usr/bin/objformat`
if [ x$objformat = xaout ]; then
if [ -e /usr/lib/aout ]; then
- libpth="/usr/lib/aout /usr/local/lib /usr/lib"
- glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
+ libpth=""
+ glibpth=""
fi
lddlflags='-Bshareable'
else
- libpth="/usr/lib /usr/local/lib"
- glibpth="/usr/lib /usr/local/lib"
+ libpth=""
+ glibpth=""
ldflags="-Wl,-E "
lddlflags="-shared "
fi
cccdlflags='-DPIC -fPIC'
;;
*)
- libpth="/usr/lib /usr/local/lib"
- glibpth="/usr/lib /usr/local/lib"
+ libpth=""
+ glibpth=""
ldflags="-Wl,-E "
lddlflags="-shared "
cccdlflags='-DPIC -fPIC'

View File

@@ -0,0 +1,5 @@
addPerlLibPath () {
addToSearchPath PERL5LIB $1/lib/perl5/site_perl
}
envHooks=(${envHooks[@]} addPerlLibPath)

View File

@@ -1,29 +0,0 @@
args: with args;
let version = lib.attrByPath ["version"] "4.2.4" args; in
rec {
src = fetchurl {
url = "ftp://infogroep.be/pub/plt/bundles/${version}/plt/plt-${version}-src-unix.tgz";
sha256 = "05azb9k0m1sp3qm3all4s39m97xwrbnqcys2vgc888nhxbff4d6g";
};
buildInputs = [cairo fontconfig freetype libjpeg libpng openssl
libXaw libXft perl mesa libX11 libXrender libICE xproto renderproto
pixman libSM libxcb libXext xextproto libXmu libXt zlib which];
configureFlags = ["--enable-shared" "--enable-pthreads" "--with-x"];
goSrcDir = "cd src";
/* doConfigure should be specified separately */
phaseNames = ["preConfigure" "doConfigure" "doMakeInstall"];
preConfigure = fullDepEntry (''
sed -e 's@/usr/bin/uname@'"$(which uname)"'@g' -i configure
'') ["minInit" "addInputs" "doUnpack"];
name = "plt-scheme" + version;
meta = {
description = "PLT scheme environment";
homepage = http://plt-scheme.org/ ;
license = "LGPL-2.1";
licenses = ["LGPL-2.1"];
};
}

View File

@@ -4,12 +4,12 @@
stdenv.mkDerivation rec {
pname = "racket";
version = "5.2.1";
version = "5.3.3";
name = "${pname}-${version}";
src = fetchurl {
url = "http://download.racket-lang.org/installers/${version}/${pname}/${name}-src-unix.tgz";
sha256 = "1v5kvp7vfi4a4bn08jlaga441amlfxpjw9dm6vc1fazwzd72m539";
sha256 = "1qp0fmsh4dkxvlj35xnwdcf4m97jcf927cwhnckjicqx1lfa0wj7";
};
# Various racket executables do run-time searches for these.
@@ -44,7 +44,7 @@ stdenv.mkDerivation rec {
'';
meta = {
description = "Racket (formerly called PLT Scheme) is a programming language derived from Scheme.";
description = "A programming language derived from Scheme (formerly called PLT Scheme).";
longDescription = ''
Racket (formerly called PLT Scheme) is a programming language derived
from Scheme. The Racket project has four primary components: the
@@ -56,7 +56,7 @@ stdenv.mkDerivation rec {
'';
homepage = http://racket-lang.org/;
license = stdenv.lib.licenses.lgpl2Plus;
license = stdenv.lib.licenses.lgpl2Plus; # and licenses of contained libraries
maintainers = [ stdenv.lib.maintainers.kkallio ];
platforms = stdenv.lib.platforms.linux;
};

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation {
propagatedBuildInputs = [ glib dbus_glib ];
buildInputs = [ polkit gtk3 libxml2 ];
buildNativeInputs = [ pkgconfig intltool ];
nativeBuildInputs = [ pkgconfig intltool ];
configureFlags = "--disable-orbit";

View File

@@ -43,7 +43,7 @@ stdenv.mkDerivation rec {
configureFlags = configureFlagsFun { inherit alsaLib; };
crossAttrs = {
configureFlags = configureFlagsFun { alsaLib = alsaLib.hostDrv; };
configureFlags = configureFlagsFun { alsaLib = alsaLib.crossDrv; };
};
passthru = {inherit openglSupport;};

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "09aj30m49ivycl3irram8c3givc0crivjm3ymw0nhfaxrwhlb186";
};
buildNativeInputs = [ gettext ];
nativeBuildInputs = [ gettext ];
buildInputs = [ attr ];
# Upstream use C++-style comments in C code. Remove them.

View File

@@ -8,7 +8,12 @@ stdenv.mkDerivation rec {
sha256 = "07wii4i824vy9qsvjsgqxppgqmfdxq0xa87i5yk53fijriadq7mb";
};
buildInputs = [ autoconf automake libtool pkgconfig freetype SDL libX11 ];
preConfigure = "sh autogen.sh";
# fix build with new automake, from Gentoo ebuild
preConfigure = ''
sed -i '/^AM_C_PROTOTYPES/d' configure.in
sh autogen.sh
'';
configureFlags = "--x-includes=${libX11}/include --x-libraries=${libX11}/lib";

View File

@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [ gwenhywfar gmp zlib ];
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
configureFlags = "--with-gwen-dir=${gwenhywfar}";

View File

@@ -28,7 +28,7 @@ stdenv.mkDerivation rec {
patches = if isMingw then [./mingw.patch] else [];
buildInputs = [aterm toolbuslib asfSupport errorSupport ptSupport sglr tideSupport cLibrary configSupport ptableSupport rstoreSupport ];
buildNativeInputs = [pkgconfig];
nativeBuildInputs = [pkgconfig];
dontStrip = isMingw;
}

View File

@@ -18,7 +18,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [aterm errorSupport ptSupport];
buildNativeInputs = [pkgconfig];
nativeBuildInputs = [pkgconfig];
dontStrip = isMingw;
}

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "eff663f90847620bb68c9c2cbaaf7f45e2ff44163b9ab3f10d15be763680491f";
};
buildNativeInputs = [ pkgconfig perl ];
nativeBuildInputs = [ pkgconfig perl ];
propagatedBuildInputs = [ glib ];

View File

@@ -10,5 +10,5 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ atk glibmm ];
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
}

View File

@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [ qt4 ];
buildNativeInputs = [ cmake ];
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
description = "A library to access Open Collaboration Service providers";

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "07qf6kb2zk512az481bbnsk9jycn477xpva1a726n5pzlzf9pmnw";
};
buildNativeInputs = [ gettext ];
nativeBuildInputs = [ gettext ];
configureFlags = "MAKE=make MSGFMT=msgfmt MSGMERGE=msgmerge XGETTEXT=xgettext ECHO=echo SED=sed AWK=gawk";

View File

@@ -19,7 +19,7 @@ stdenv.mkDerivation rec {
++ (stdenv.lib.optional qt4Support qt4)
++ libiconvOrEmpty;
buildNativeInputs = [ pkgconfig gettext intltool ];
nativeBuildInputs = [ pkgconfig gettext intltool ];
configureFlags =
[ "--disable-qt3" "--disable-gdbm" "--disable-mono"

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "0akwb57lnzq1ak32k6mdxbma2gj0pqhj8y9m6hq79djb9s3mxvmn";
};
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
meta = {
description = "Library for operations on boolean expression binary trees";

View File

@@ -29,7 +29,7 @@ let
(enableShared && enableStatic)) then
"tagged" else "system";
cflags = if (enablePIC) then "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC" else "";
cflags = if enablePIC then "cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC" else "";
in
@@ -71,7 +71,7 @@ stdenv.mkDerivation {
];
crossAttrs = rec {
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
# override them.
propagatedBuildInputs = buildInputs;
@@ -85,7 +85,7 @@ stdenv.mkDerivation {
cat << EOF > user-config.jam
using gcc : cross : $crossConfig-g++ ;
EOF
./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
./bjam -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
'';
};
}

View File

@@ -1,90 +0,0 @@
{ stdenv, fetchurl, icu, expat, zlib, bzip2, python
, enableRelease ? true
, enableDebug ? false
, enableSingleThreaded ? false
, enableMultiThreaded ? true
, enableShared ? true
, enableStatic ? false
, enablePIC ? false
, enableExceptions ? false
}:
let
variant = stdenv.lib.concatStringsSep ","
(stdenv.lib.optional enableRelease "release" ++
stdenv.lib.optional enableDebug "debug");
threading = stdenv.lib.concatStringsSep ","
(stdenv.lib.optional enableSingleThreaded "single" ++
stdenv.lib.optional enableMultiThreaded "multi");
link = stdenv.lib.concatStringsSep ","
(stdenv.lib.optional enableShared "shared" ++
stdenv.lib.optional enableStatic "static");
# To avoid library name collisions
finalLayout = if ((enableRelease && enableDebug) ||
(enableSingleThreaded && enableMultiThreaded) ||
(enableShared && enableStatic)) then
"tagged" else "system";
cflags = if (enablePIC && enableExceptions) then
"cflags=-fPIC -fexceptions cxxflags=-fPIC linkflags=-fPIC"
else if (enablePIC) then
"cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC"
else if (enableExceptions) then
"cflags=-fexceptions"
else
"";
in
stdenv.mkDerivation {
name = "boost-1.47.0";
meta = {
homepage = "http://boost.org/";
description = "Boost C++ Library Collection";
license = "boost-license";
maintainers = [ stdenv.lib.maintainers.simons ];
};
src = fetchurl {
url = "mirror://sourceforge/boost/boost_1_47_0.tar.bz2";
sha256 = "815a5d9faac4dbd523fbcf3fe1065e443c0bbf43427c44aa423422c6ec4c2e31";
};
# See <http://svn.boost.org/trac/boost/ticket/4688>.
patches = [ ./boost_filesystem_1_47_0.patch ];
enableParallelBuilding = true;
buildInputs = [icu expat zlib bzip2 python];
configureScript = "./bootstrap.sh";
configureFlags = "--with-icu=${icu} --with-python=${python}/bin/python";
buildPhase = "./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat}/include -sEXPAT_LIBPATH=${expat}/lib --layout=${finalLayout} variant=${variant} threading=${threading} link=${link} ${cflags} install";
installPhase = ":";
crossAttrs = rec {
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
# override them.
propagatedBuildInputs = buildInputs;
# We want to substitute the contents of configureFlags, removing thus the
# usual --build and --host added on cross building.
preConfigure = ''
export configureFlags="--prefix=$out --without-icu"
'';
buildPhase = ''
set -x
cat << EOF > user-config.jam
using gcc : cross : $crossConfig-g++ ;
EOF
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
'';
};
}

View File

@@ -29,11 +29,11 @@ let
(enableShared && enableStatic)) then
"tagged" else "system";
cflags = if (enablePIC && enableExceptions) then
cflags = if enablePIC && enableExceptions then
"cflags=-fPIC -fexceptions cxxflags=-fPIC linkflags=-fPIC"
else if (enablePIC) then
else if enablePIC then
"cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC"
else if (enableExceptions) then
else if enableExceptions then
"cflags=-fexceptions"
else
"";
@@ -57,7 +57,7 @@ stdenv.mkDerivation {
};
# See <http://svn.boost.org/trac/boost/ticket/4688>.
patches = [ ./boost_filesystem_post_1_49_0.patch ];
patches = [ ./boost_filesystem_post_1_49_0.patch ./time_utc.patch ];
enableParallelBuilding = true;
@@ -71,7 +71,7 @@ stdenv.mkDerivation {
installPhase = ":";
crossAttrs = rec {
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
# override them.
propagatedBuildInputs = buildInputs;
@@ -85,7 +85,7 @@ stdenv.mkDerivation {
cat << EOF > user-config.jam
using gcc : cross : $crossConfig-g++ ;
EOF
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${finalLayout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
'';
};
}

View File

@@ -27,11 +27,11 @@ let
# To avoid library name collisions
layout = if taggedLayout then "tagged" else "system";
cflags = if (enablePIC && enableExceptions) then
cflags = if enablePIC && enableExceptions then
"cflags=-fPIC -fexceptions cxxflags=-fPIC linkflags=-fPIC"
else if (enablePIC) then
else if enablePIC then
"cflags=-fPIC cxxflags=-fPIC linkflags=-fPIC"
else if (enableExceptions) then
else if enableExceptions then
"cflags=-fexceptions"
else
"";
@@ -71,7 +71,7 @@ stdenv.mkDerivation {
'';
crossAttrs = rec {
buildInputs = [ expat.hostDrv zlib.hostDrv bzip2.hostDrv ];
buildInputs = [ expat.crossDrv zlib.crossDrv bzip2.crossDrv ];
# all buildInputs set previously fell into propagatedBuildInputs, as usual, so we have to
# override them.
propagatedBuildInputs = buildInputs;
@@ -85,7 +85,7 @@ stdenv.mkDerivation {
cat << EOF > user-config.jam
using gcc : cross : $crossConfig-g++ ;
EOF
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.hostDrv}/include -sEXPAT_LIBPATH=${expat.hostDrv}/lib --layout=${layout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
./b2 -j$NIX_BUILD_CORES -sEXPAT_INCLUDE=${expat.crossDrv}/include -sEXPAT_LIBPATH=${expat.crossDrv}/lib --layout=${layout} --user-config=user-config.jam toolset=gcc-cross variant=${variant} threading=${threading} link=${link} ${cflags} --without-python install
'';
};
}

View File

@@ -1,24 +0,0 @@
diff -ubr boost_1_47_0/libs/filesystem/v2/src/v2_path.cpp boost_1_47_0-patched/libs/filesystem/v2/src/v2_path.cpp
--- boost_1_47_0/libs/filesystem/v2/src/v2_path.cpp 2011-01-11 22:39:33.000000000 +0100
+++ boost_1_47_0-patched/libs/filesystem/v2/src/v2_path.cpp 2011-07-21 01:06:26.000000000 +0200
@@ -45,7 +45,7 @@
{
#if !defined(macintosh) && !defined(__APPLE__) && !defined(__APPLE_CC__)
// ISO C calls this "the locale-specific native environment":
- static std::locale lc("");
+ static std::locale lc;
#else // Mac OS
// "All BSD system functions expect their string parameters to be in UTF-8 encoding
// and nothing else."
diff -ubr boost_1_47_0/libs/filesystem/v3/src/path.cpp boost_1_47_0-patched/libs/filesystem/v3/src/path.cpp
--- boost_1_47_0/libs/filesystem/v3/src/path.cpp 2011-07-05 16:49:42.000000000 +0200
+++ boost_1_47_0-patched/libs/filesystem/v3/src/path.cpp 2011-07-21 01:06:26.000000000 +0200
@@ -767,7 +767,7 @@
// or LANG are wrong, for example), so dynamic initialization is used to ensure
// that exceptions can be caught.
- return std::locale("");
+ return std::locale();
# endif
}

View File

@@ -0,0 +1,320 @@
From: https://build.opensuse.org/package/view_file?file=boost-time_utc.patch&package=boost&project=Application%3AGeo
From: https://svn.boost.org/trac/boost/changeset/78802
Message:
Thread: fix TIME_UTC, WINVER, constexpr for tags, and don't use local files
Only the TIME_UTC_ change is taken
Index: boost_1_49_0/boost/thread/xtime.hpp
===================================================================
--- boost_1_49_0.orig/boost/thread/xtime.hpp
+++ boost_1_49_0/boost/thread/xtime.hpp
@@ -2,7 +2,7 @@
// William E. Kempf
// Copyright (C) 2007-8 Anthony Williams
//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_XTIME_WEK070601_HPP
@@ -20,7 +20,7 @@ namespace boost {
enum xtime_clock_types
{
- TIME_UTC=1
+ TIME_UTC_=1
// TIME_TAI,
// TIME_MONOTONIC,
// TIME_PROCESS,
@@ -53,14 +53,14 @@ struct xtime
boost::posix_time::microseconds((nsec+500)/1000);
#endif
}
-
+
};
inline xtime get_xtime(boost::system_time const& abs_time)
{
xtime res;
boost::posix_time::time_duration const time_since_epoch=abs_time-boost::posix_time::from_time_t(0);
-
+
res.sec=static_cast<xtime::xtime_sec_t>(time_since_epoch.total_seconds());
res.nsec=static_cast<xtime::xtime_nsec_t>(time_since_epoch.fractional_seconds()*(1000000000/time_since_epoch.ticks_per_second()));
return res;
@@ -68,7 +68,7 @@ inline xtime get_xtime(boost::system_tim
inline int xtime_get(struct xtime* xtp, int clock_type)
{
- if (clock_type == TIME_UTC)
+ if (clock_type == TIME_UTC_)
{
*xtp=get_xtime(get_system_time());
return clock_type;
@@ -81,7 +81,7 @@ inline int xtime_cmp(const xtime& xt1, c
{
if (xt1.sec == xt2.sec)
return (int)(xt1.nsec - xt2.nsec);
- else
+ else
return (xt1.sec > xt2.sec) ? 1 : -1;
}
Index: boost_1_49_0/libs/thread/example/starvephil.cpp
===================================================================
--- boost_1_49_0.orig/libs/thread/example/starvephil.cpp
+++ boost_1_49_0/libs/thread/example/starvephil.cpp
@@ -50,7 +50,7 @@ public:
<< "very hot ..." << std::endl;
}
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 3;
boost::thread::sleep(xt);
m_chickens += value;
@@ -85,7 +85,7 @@ void chef()
std::cout << "(" << clock() << ") Chef: cooking ..." << std::endl;
}
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 2;
boost::thread::sleep(xt);
{
@@ -111,7 +111,7 @@ struct phil
if (m_id > 0)
{
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 3;
boost::thread::sleep(xt);
}
Index: boost_1_49_0/libs/thread/example/tennis.cpp
===================================================================
--- boost_1_49_0.orig/libs/thread/example/tennis.cpp
+++ boost_1_49_0/libs/thread/example/tennis.cpp
@@ -1,7 +1,7 @@
// Copyright (C) 2001-2003
// William E. Kempf
//
-// Distributed under the Boost Software License, Version 1.0. (See accompanying
+// Distributed under the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#include <boost/thread/mutex.hpp>
@@ -104,7 +104,7 @@ int main(int argc, char* argv[])
boost::thread thrdb(thread_adapter(&player, (void*)PLAYER_B));
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 1;
boost::thread::sleep(xt);
{
Index: boost_1_49_0/libs/thread/example/thread.cpp
===================================================================
--- boost_1_49_0.orig/libs/thread/example/thread.cpp
+++ boost_1_49_0/libs/thread/example/thread.cpp
@@ -14,7 +14,7 @@ struct thread_alarm
void operator()()
{
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += m_secs;
boost::thread::sleep(xt);
Index: boost_1_49_0/libs/thread/example/xtime.cpp
===================================================================
--- boost_1_49_0.orig/libs/thread/example/xtime.cpp
+++ boost_1_49_0/libs/thread/example/xtime.cpp
@@ -10,7 +10,7 @@
int main(int argc, char* argv[])
{
boost::xtime xt;
- boost::xtime_get(&xt, boost::TIME_UTC);
+ boost::xtime_get(&xt, boost::TIME_UTC_);
xt.sec += 1;
boost::thread::sleep(xt); // Sleep for 1 second
}
Index: boost_1_49_0/libs/thread/src/pthread/thread.cpp
===================================================================
--- boost_1_49_0.orig/libs/thread/src/pthread/thread.cpp
+++ boost_1_49_0/libs/thread/src/pthread/thread.cpp
@@ -23,7 +23,7 @@
#include <unistd.h>
#endif
-#include "timeconv.inl"
+#include <libs/thread/src/pthread/timeconv.inl>
namespace boost
{
@@ -354,7 +354,7 @@ namespace boost
cond.timed_wait(lock, xt);
# endif
xtime cur;
- xtime_get(&cur, TIME_UTC);
+ xtime_get(&cur, TIME_UTC_);
if (xtime_cmp(xt, cur) <= 0)
return;
}
@@ -369,7 +369,7 @@ namespace boost
BOOST_VERIFY(!pthread_yield());
# else
xtime xt;
- xtime_get(&xt, TIME_UTC);
+ xtime_get(&xt, TIME_UTC_);
sleep(xt);
# endif
}
Index: boost_1_49_0/libs/thread/src/pthread/timeconv.inl
===================================================================
--- boost_1_49_0.orig/libs/thread/src/pthread/timeconv.inl
+++ boost_1_49_0/libs/thread/src/pthread/timeconv.inl
@@ -20,8 +20,8 @@ const int NANOSECONDS_PER_MICROSECOND =
inline void to_time(int milliseconds, boost::xtime& xt)
{
int res = 0;
- res = boost::xtime_get(&xt, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&xt, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -56,8 +56,8 @@ inline void to_timespec_duration(const b
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
if (boost::xtime_cmp(xt, cur) <= 0)
{
@@ -87,8 +87,8 @@ inline void to_duration(boost::xtime xt,
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
if (boost::xtime_cmp(xt, cur) <= 0)
milliseconds = 0;
@@ -109,8 +109,8 @@ inline void to_microduration(boost::xtim
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- BOOST_ASSERT(res == boost::TIME_UTC); (void)res;
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ BOOST_ASSERT(res == boost::TIME_UTC_); (void)res;
if (boost::xtime_cmp(xt, cur) <= 0)
microseconds = 0;
Index: boost_1_49_0/libs/thread/src/win32/timeconv.inl
===================================================================
--- boost_1_49_0.orig/libs/thread/src/win32/timeconv.inl
+++ boost_1_49_0/libs/thread/src/win32/timeconv.inl
@@ -17,8 +17,8 @@ const int NANOSECONDS_PER_MICROSECOND =
inline void to_time(int milliseconds, boost::xtime& xt)
{
int res = 0;
- res = boost::xtime_get(&xt, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&xt, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
xt.sec += (milliseconds / MILLISECONDS_PER_SECOND);
xt.nsec += ((milliseconds % MILLISECONDS_PER_SECOND) *
@@ -54,8 +54,8 @@ inline void to_timespec_duration(const b
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
{
@@ -85,8 +85,8 @@ inline void to_duration(boost::xtime xt,
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
milliseconds = 0;
@@ -107,8 +107,8 @@ inline void to_microduration(boost::xtim
{
boost::xtime cur;
int res = 0;
- res = boost::xtime_get(&cur, boost::TIME_UTC);
- assert(res == boost::TIME_UTC);
+ res = boost::xtime_get(&cur, boost::TIME_UTC_);
+ assert(res == boost::TIME_UTC_);
if (boost::xtime_cmp(xt, cur) <= 0)
microseconds = 0;
Index: boost_1_49_0/libs/thread/test/test_xtime.cpp
===================================================================
--- boost_1_49_0.orig/libs/thread/test/test_xtime.cpp
+++ boost_1_49_0/libs/thread/test/test_xtime.cpp
@@ -17,8 +17,8 @@ void test_xtime_cmp()
{
boost::xtime xt1, xt2, cur;
BOOST_CHECK_EQUAL(
- boost::xtime_get(&cur, boost::TIME_UTC),
- static_cast<int>(boost::TIME_UTC));
+ boost::xtime_get(&cur, boost::TIME_UTC_),
+ static_cast<int>(boost::TIME_UTC_));
xt1 = xt2 = cur;
xt1.nsec -= 1;
@@ -42,14 +42,14 @@ void test_xtime_get()
boost::xtime orig, cur, old;
BOOST_CHECK_EQUAL(
boost::xtime_get(&orig,
- boost::TIME_UTC), static_cast<int>(boost::TIME_UTC));
+ boost::TIME_UTC_), static_cast<int>(boost::TIME_UTC_));
old = orig;
for (int x=0; x < 100; ++x)
{
BOOST_CHECK_EQUAL(
- boost::xtime_get(&cur, boost::TIME_UTC),
- static_cast<int>(boost::TIME_UTC));
+ boost::xtime_get(&cur, boost::TIME_UTC_),
+ static_cast<int>(boost::TIME_UTC_));
BOOST_CHECK(boost::xtime_cmp(cur, orig) >= 0);
BOOST_CHECK(boost::xtime_cmp(cur, old) >= 0);
old = cur;
Index: boost_1_49_0/libs/thread/test/util.inl
===================================================================
--- boost_1_49_0.orig/libs/thread/test/util.inl
+++ boost_1_49_0/libs/thread/test/util.inl
@@ -28,8 +28,8 @@ inline boost::xtime delay(int secs, int
const int NANOSECONDS_PER_MILLISECOND = 1000000;
boost::xtime xt;
- if (boost::TIME_UTC != boost::xtime_get (&xt, boost::TIME_UTC))
- BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC");
+ if (boost::TIME_UTC_ != boost::xtime_get (&xt, boost::TIME_UTC_))
+ BOOST_ERROR ("boost::xtime_get != boost::TIME_UTC_");
nsecs += xt.nsec;
msecs += nsecs / NANOSECONDS_PER_MILLISECOND;

View File

@@ -17,6 +17,6 @@ stdenv.mkDerivation rec {
patches = if isMingw then [./mingw.patch] else [];
buildInputs = [aterm];
buildNativeInputs = [pkgconfig];
nativeBuildInputs = [pkgconfig];
dontStrip = isMingw;
}

View File

@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [ ois ogre boost ];
buildNativeInputs = [ cmake pkgconfig ];
nativeBuildInputs = [ cmake pkgconfig ];
enableParallelBuilding = true;

View File

@@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
configureFlags = "--with-ppl=${ppl}";
crossAttrs = {
configureFlags = "--with-ppl=${ppl.hostDrv}";
configureFlags = "--with-ppl=${ppl.crossDrv}";
};
doCheck = true;

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "1arffdwivig88kkx685pldr784njm0249k0rb1f1plwavlrw9zfx";
};
buildNativeInputs = [ cmake ];
nativeBuildInputs = [ cmake ];
buildInputs = [ boost zlib ];

View File

@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
propagatedBuildInputs = [ clutter gtk ];
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
postBuild = "rm -rf $out/share/gtk-doc";

View File

@@ -9,7 +9,7 @@ stdenv.mkDerivation rec {
};
propagatedBuildInputs = [ clutter gtk3 ];
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
postBuild = "rm -rf $out/share/gtk-doc";

View File

@@ -9,7 +9,7 @@ stdenv.mkDerivation {
sha256 = "0bzsvnharawfg525lpavrp55mq4aih5nb01dwwqwnccg8hk9z2fw";
};
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs =
[ libX11 mesa libXext libXfixes libXdamage libXcomposite libXi cogl pango
atk json_glib

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
sha256 = "1ix87hz3qxqysqwx58wbc46lzchlmfs08fjzbf3l6mmsqj8gs9pc";
};
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs =
[ mesa glib gdk_pixbuf libXfixes libXcomposite libXdamage ];

View File

@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [aterm];
buildNativeInputs = [pkgconfig];
nativeBuildInputs = [pkgconfig];
dontStrip = isMingw;
}

View File

@@ -1,20 +1,16 @@
{ fetchurl, stdenv, unzip, libtool }:
stdenv.mkDerivation rec {
name = "crypto++-5.6.1";
name = "crypto++-5.6.2";
src = fetchurl {
url = "mirror://sourceforge/cryptopp/cryptopp561.zip";
sha256 = "0s7jhvnfihikqp1iwpdz03fad62xkjxci6jiahrh6f3sn664vrwq";
url = "mirror://sourceforge/cryptopp/cryptopp562.zip";
sha256 = "0x1mqpz1v071cfrw4grbw7z734cxnpry1qh2b6rsmcx6nkyd5gsw";
};
patches = [
./pic.patch
./salsa-gcc4.6.patch
] ++ stdenv.lib.optional (stdenv.system != "i686-cygwin") ./dll.patch;
patches = stdenv.lib.optional (stdenv.system != "i686-cygwin") ./dll.patch;
buildInputs = [ unzip ];
buildInputs = [ unzip libtool ];
# Unpack the thing in a subdirectory.
unpackPhase = ''
@@ -37,7 +33,7 @@ stdenv.mkDerivation rec {
# I add what 'enableParallelBuilding' would add to the make call,
# if we were using the generic build phase.
buildPhase = ''
make PREFIX="$out" all libcryptopp.so -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES
make PREFIX="$out" all -j$NIX_BUILD_CORES -l$NIX_BUILD_CORES
'';
# TODO: Installing cryptotest.exe doesn't seem to be necessary. We run
@@ -53,7 +49,7 @@ stdenv.mkDerivation rec {
meta = {
description = "Crypto++, a free C++ class library of cryptographic schemes";
homepage = http://cryptopp.com/;
license = "Public Domain";
license = "Boost 1.0";
maintainers = [ stdenv.lib.maintainers.ludo ];
};
}

View File

@@ -1,22 +0,0 @@
Build position-independent code, for shared libraries. Fix $(DLLSRCS)
while we're at it (it lacks `pssr.cpp', for instance).
--- a/GNUmakefile 2009-03-15 02:48:02.000000000 +0100
+++ b/GNUmakefile 2009-08-11 00:13:43.000000000 +0200
@@ -104,6 +104,7 @@ TESTOBJS = bench.o bench2.o test.o valid
LIBOBJS = $(filter-out $(TESTOBJS),$(OBJS))
DLLSRCS = algebra.cpp algparam.cpp asn.cpp basecode.cpp cbcmac.cpp channels.cpp cryptlib.cpp des.cpp dessp.cpp dh.cpp dll.cpp dsa.cpp ec2n.cpp eccrypto.cpp ecp.cpp eprecomp.cpp files.cpp filters.cpp fips140.cpp fipstest.cpp gf2n.cpp gfpcrypt.cpp hex.cpp hmac.cpp integer.cpp iterhash.cpp misc.cpp modes.cpp modexppc.cpp mqueue.cpp nbtheory.cpp oaep.cpp osrng.cpp pch.cpp pkcspad.cpp pubkey.cpp queue.cpp randpool.cpp rdtables.cpp rijndael.cpp rng.cpp rsa.cpp sha.cpp simple.cpp skipjack.cpp strciphr.cpp trdlocal.cpp
+DLLSRCS = $(SRCS)
DLLOBJS = $(DLLSRCS:.cpp=.export.o)
LIBIMPORTOBJS = $(LIBOBJS:.o=.import.o)
TESTIMPORTOBJS = $(TESTOBJS:.o=.import.o)
@@ -162,7 +162,7 @@ endif
$(CXX) $(CXXFLAGS) -DCRYPTOPP_IMPORTS -c $< -o $@
%.export.o : %.cpp
- $(CXX) $(CXXFLAGS) -DCRYPTOPP_EXPORTS -c $< -o $@
+ $(CXX) $(CXXFLAGS) -fPIC -DCRYPTOPP_EXPORTS -c $< -o $@
%.o : %.cpp
$(CXX) $(CXXFLAGS) -c $<

View File

@@ -1,62 +0,0 @@
From fbccde3578feddb16f07be981da1d0f26209fd04 Mon Sep 17 00:00:00 2001
From: weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>
Date: Sun, 5 Jun 2011 21:07:11 +0000
Subject: [PATCH 1/4] fix Salsa validation failure when compiling with GCC 4.6
(https://sourceforge.net/apps/trac/cryptopp/ticket/12)
git-svn-id: https://cryptopp.svn.sourceforge.net/svnroot/cryptopp/trunk@529 57ff6487-cd31-0410-9ec3-f628ee90f5f0
---
c5/salsa.cpp | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
# NOTE: remove the c5 path component
diff --git a/salsa.cpp b/salsa.cpp
index bd216ee..bdc5d75 100755
--- a/salsa.cpp
+++ b/salsa.cpp
@@ -122,17 +122,17 @@ void Salsa20_Policy::OperateKeystream(KeystreamOperation operation, byte *output
if (HasSSE2())
{
#if CRYPTOPP_BOOL_X64
- #define REG_output %4
- #define REG_input %1
+ #define REG_output %1
+ #define REG_input %0
#define REG_iterationCount %2
- #define REG_state %3
- #define REG_rounds %0
+ #define REG_state %4 /* constant */
+ #define REG_rounds %3 /* constant */
#define REG_roundsLeft eax
#define REG_temp32 edx
#define REG_temp rdx
- #define SSE2_WORKSPACE %5
+ #define SSE2_WORKSPACE %5 /* constant */
- FixedSizeAlignedSecBlock<byte, 32*16> workspace;
+ CRYPTOPP_ALIGN_DATA(16) byte workspace[16*32];
#else
#define REG_output edi
#define REG_input eax
@@ -457,12 +457,13 @@ void Salsa20_Policy::OperateKeystream(KeystreamOperation operation, byte *output
#ifdef __GNUC__
AS_POP_IF86( bx)
".att_syntax prefix;"
- :
#if CRYPTOPP_BOOL_X64
- : "r" (m_rounds), "r" (input), "r" (iterationCount), "r" (m_state.data()), "r" (output), "r" (workspace.m_ptr)
- : "%eax", "%edx", "memory", "cc", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15"
+ : "+r" (input), "+r" (output), "+r" (iterationCount)
+ : "r" (m_rounds), "r" (m_state.m_ptr), "r" (workspace)
+ : "%eax", "%rdx", "memory", "cc", "%xmm0", "%xmm1", "%xmm2", "%xmm3", "%xmm4", "%xmm5", "%xmm6", "%xmm7", "%xmm8", "%xmm9", "%xmm10", "%xmm11", "%xmm12", "%xmm13", "%xmm14", "%xmm15"
#else
- : "d" (m_rounds), "a" (input), "c" (iterationCount), "S" (m_state.data()), "D" (output)
+ : "+a" (input), "+D" (output), "+c" (iterationCount)
+ : "d" (m_rounds), "S" (m_state.m_ptr)
: "memory", "cc"
#endif
);
--
1.7.9.2

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "04fiwld5yaxyggxlvdmbaqkngh4fn8gfkkqckcp3274bpgb82z19";
};
buildNativeInputs = [ pkgconfig gettext ];
nativeBuildInputs = [ pkgconfig gettext ];
buildInputs = [ expat ] ++ stdenv.lib.optional (!stdenv.isLinux) libiconv;

View File

@@ -17,7 +17,7 @@ in rec {
libs = stdenv.mkDerivation {
name = "dbus-library-" + version;
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ expat ];
@@ -48,7 +48,7 @@ in rec {
configureFlags = "${configureFlags} --with-dbus-daemondir=${daemon}/bin";
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ expat libs ]
++ stdenv.lib.optionals useX11 [ libX11 libICE libSM ];

View File

@@ -10,7 +10,7 @@ stdenv.mkDerivation {
sha256 = s.hash;
};
buildNativeInputs = [ perl ];
nativeBuildInputs = [ perl ];
buildInputs = [ pkgconfig zlib libjpeg freetype giflib libpng ]
++ stdenv.lib.optional enableSDL SDL

View File

@@ -5,15 +5,15 @@ let
in
stdenv.mkDerivation {
name = "eigen-${v}";
src = fetchurl {
url = "http://bitbucket.org/eigen/eigen/get/${v}.tar.bz2";
name = "eigen-${v}.tar.bz2";
sha256 = "1akcb4g5hvc664gfc6sxb6f6jrm55fgks6017wg0smyvmm6k09v0";
};
buildNativeInputs = [ cmake ];
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
description = "C++ template library for linear algebra: vectors, matrices, and related algorithms";
license = licenses.lgpl3Plus;

View File

@@ -12,7 +12,7 @@ stdenv.mkDerivation {
sha256 = "1hywvbn4a8f96fjn3cvd6nxzh5jvh05s1r263d9vqlgn25dxrzay";
};
buildNativeInputs = [ cmake ];
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
description = "C++ template library for linear algebra: vectors, matrices, and related algorithms";

View File

@@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
};
buildInputs = [aterm toolbuslib];
buildNativeInputs = [pkgconfig];
nativeBuildInputs = [pkgconfig];
dontStrip = isMingw;
}

View File

@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
buildInputs = [ libnice python pygobject gst_python gupnp_igd ];
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ gstreamer gst_plugins_base ];

View File

@@ -10,11 +10,11 @@ stdenv.mkDerivation rec {
sha256 = "1nbkbvq959f70zhr03fwdibhs0sbf1k7zmbz9w99vda7gdcl0nps";
};
buildInputs = [ libnice python pygobject gupnp_igd ];
buildInputs = [ libnice python pygobject gupnp_igd libnice ];
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ gstreamer gst_plugins_base gst_python
propagatedBuildInputs = [ gstreamer gst_plugins_base gst_python
gst_plugins_good gst_plugins_bad gst_ffmpeg
];

View File

@@ -74,6 +74,10 @@ stdenv.mkDerivation rec {
];
};
passthru = {
inherit vdpauSupport;
};
meta = {
homepage = http://www.ffmpeg.org/;
description = "A complete, cross-platform solution to record, convert and stream audio and video";

View File

@@ -14,7 +14,7 @@ composableDerivation.composableDerivation {} {
propagatedBuildInputs = [ x11 inputproto libXi freeglut ];
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
flags =
# this could be tidied up (?).. eg why does it require freeglut without glSupport?

View File

@@ -2,11 +2,11 @@
stdenv.mkDerivation {
name = "fmod-42204";
src = if (stdenv.system == "i686-linux") then
src = if stdenv.system == "i686-linux" then
fetchurl {
url = http://www.fmod.org/index.php/release/version/fmodapi42204linux.tar.gz;
sha256 = "64eedc5b37c597eb925de446106d75cab0b5a79697d5ec048d34702812c08563";
} else if (stdenv.system == "x86_64-linux") then
} else if stdenv.system == "x86_64-linux" then
fetchurl {
url = http://www.fmod.org/index.php/release/version/fmodapi42204linux64.tar.gz;
sha256 = "3f2eec8265838a1005febe07c4971660e85010e4622911890642dc438746edf3";

View File

@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
propagatedBuildInputs = [ zlib curl ];
buildNativeInputs = [ automake libtool autoconf unzip ];
nativeBuildInputs = [ automake libtool autoconf unzip ];
meta = {
description = "SyncML client sdk by Funambol project";

View File

@@ -8,7 +8,7 @@ stdenv.mkDerivation rec {
sha256 = "18cr51y5qacvs2fc2p1bqv32rs8bzgs6l67zhasyl45yx055y218";
};
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ python glib ];

View File

@@ -11,7 +11,7 @@ stdenv.mkDerivation rec {
# !!! We might want to factor out the gdk-pixbuf-xlib subpackage.
buildInputs = [ libX11 ];
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
propagatedBuildInputs = [ glib libtiff libjpeg libpng jasper ];

View File

@@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ babl libpng cairo libjpeg librsvg pango gtk bzip2 intltool ];
buildNativeInputs = [ pkgconfig ];
nativeBuildInputs = [ pkgconfig ];
meta = {
description = "Graph-based image processing framework";

View File

@@ -8,6 +8,8 @@ stdenv.mkDerivation (rec {
sha256 = "1sa3ch12qxa4h3ya6hkz119yclcccmincl9j20dhrdx5mykp3b4k";
};
patches = [ ./no-gets.patch ];
configureFlags = [ "--disable-csharp" ]
++ (stdenv.lib.optionals stdenv.isCygwin
[ # We have a static libiconv, so we can only build the static lib.
@@ -34,7 +36,7 @@ stdenv.mkDerivation (rec {
crossAttrs = {
buildInputs = stdenv.lib.optional (stdenv.gccCross.libc ? libiconv)
stdenv.gccCross.libc.libiconv.hostDrv;
stdenv.gccCross.libc.libiconv.crossDrv;
# Gettext fails to guess the cross compiler
configureFlags = "CXX=${stdenv.cross.config}-g++";
};

View File

@@ -0,0 +1,42 @@
hack until gzip pulls a newer gnulib version
From 66712c23388e93e5c518ebc8515140fa0c807348 Mon Sep 17 00:00:00 2001
From: Eric Blake <eblake@redhat.com>
Date: Thu, 29 Mar 2012 13:30:41 -0600
Subject: [PATCH] stdio: don't assume gets any more
Gnulib intentionally does not have a gets module, and now that C11
and glibc have dropped it, we should be more proactive about warning
any user on a platform that still has a declaration of this dangerous
interface.
--- a/gettext-tools/libgettextpo/stdio.in.h
+++ b/gettext-tools/libgettextpo/stdio.in.h
@@ -125,7 +125,6 @@
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@
--- a/gettext-tools/gnulib-lib/stdio.in.h
+++ b/gettext-tools/gnulib-lib/stdio.in.h
@@ -125,7 +125,6 @@
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@
--- a/gettext-runtime/gnulib-lib/stdio.in.h
+++ b/gettext-runtime/gnulib-lib/stdio.in.h
@@ -125,7 +125,6 @@
so any use of gets warrants an unconditional warning. Assume it is
always declared, since it is required by C89. */
#undef gets
-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
#if @GNULIB_FOPEN@
# if @REPLACE_FOPEN@

View File

@@ -15,7 +15,7 @@ stdenv.mkDerivation {
sed -e "s@${glib}/lib/gio/modules@$out/lib/gio/modules@g" -i $(find . -name Makefile)
'';
buildNativeInputs = [ pkgconfig intltool ];
nativeBuildInputs = [ pkgconfig intltool ];
propagatedBuildInputs =
[ glib libtool gnutls2 libproxy libgcrypt libtasn1 gsettings_desktop_schemas ];
}

View File

@@ -22,7 +22,7 @@ stdenv.mkDerivation (rec {
# configure script looks for d-bus but it is only needed for tests
buildInputs = [ libiconvOrNull ];
buildNativeInputs = [ perl pkgconfig gettext python ];
nativeBuildInputs = [ perl pkgconfig gettext python ];
propagatedBuildInputs = [ pcre zlib libffi ];

View File

@@ -39,7 +39,7 @@ stdenv.mkDerivation ({
inherit kernelHeaders installLocales;
# The host/target system.
crossConfig = if (cross != null) then cross.config else null;
crossConfig = if cross != null then cross.config else null;
inherit (stdenv) is64bit;
@@ -102,14 +102,16 @@ stdenv.mkDerivation ({
"-C"
"--enable-add-ons"
"--sysconfdir=/etc"
"--localedir=/var/run/current-system/sw/lib/locale" ] ++
(stdenv.lib.optional (stdenv.name == "stdenv") "libc_cv_ssp=no") ++ [
"--localedir=/var/run/current-system/sw/lib/locale"
"libc_cv_ssp=no"
(if kernelHeaders != null
then "--with-headers=${kernelHeaders}/include"
else "--without-headers")
(if profilingLibraries
then "--enable-profile"
else "--disable-profile")
] ++ stdenv.lib.optionals (cross == null && kernelHeaders != null) [
"--enable-kernel=2.6.35"
] ++ stdenv.lib.optionals (cross != null) [
(if cross.withTLS then "--with-tls" else "--without-tls")
(if cross.float == "soft" then "--without-fp" else "--with-fp")
@@ -118,11 +120,20 @@ stdenv.mkDerivation ({
&& cross.platform.kernelMajor == "2.6") [
"--enable-kernel=2.6.0"
"--with-__thread"
] ++ stdenv.lib.optionals stdenv.isArm [
] ++ stdenv.lib.optionals (cross == null &&
(stdenv.system == "armv5tel-linux")) [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
"--without-fp"
# To avoid linking with -lgcc_s (dynamic link)
# so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no"
] ++ stdenv.lib.optionals (cross == null && stdenv.platform.name == "raspberrypi") [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
"--with-fp"
# To avoid linking with -lgcc_s (dynamic link)
# so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no"

View File

@@ -1,223 +0,0 @@
/* Build configuration used to build glibc, Info files, and locale
information. */
cross :
{ name, fetchurl, stdenv, installLocales ? false
, gccCross ? null, kernelHeaders ? null
, machHeaders ? null, hurdHeaders ? null, libpthreadHeaders ? null
, mig ? null, fetchgit ? null
, profilingLibraries ? false, meta
, preConfigure ? "", ... }@args :
let
# For GNU/Hurd, see below.
version = if hurdHeaders != null then "20111025" else "2.14.1";
needsPortsNative = stdenv.isMips || stdenv.isArm;
needsPortsCross = cross.arch == "mips" || cross.arch == "arm";
needsPorts = if (stdenv ? cross) && stdenv.cross != null then true
else if cross == null then needsPortsNative
else needsPortsCross;
srcPorts = fetchurl {
url = "mirror://gnu/glibc/glibc-ports-2.14.1.tar.bz2";
sha256 = "1acs4sd5mjzmssmd0md6dfqwnziph2am7v09mbnnd8aadpxhm0qw";
};
in
assert (cross != null) -> (gccCross != null);
assert (mig != null) -> (machHeaders != null);
assert (machHeaders != null) -> (hurdHeaders != null);
assert (hurdHeaders != null) -> (libpthreadHeaders != null);
assert (hurdHeaders != null) -> (fetchgit != null);
stdenv.mkDerivation ({
inherit kernelHeaders installLocales;
# The host/target system.
crossConfig = if (cross != null) then cross.config else null;
inherit (stdenv) is64bit;
enableParallelBuilding = true;
patches =
stdenv.lib.optional (fetchgit == null)
/* Fix for NIXPKGS-79: when doing host name lookups, when
nsswitch.conf contains a line like
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4
don't return an error when mdns4_minimal can't be found. This
is a bug in Glibc: when a service can't be found, NSS should
continue to the next service unless "UNAVAIL=return" is set.
("NOTFOUND=return" refers to the service returning a NOTFOUND
error, not the service itself not being found.) The reason is
that the "status" variable (while initialised to UNAVAIL) is
outside of the loop that iterates over the services, the
"files" service sets status to NOTFOUND. So when the call to
find "mdns4_minimal" fails, "status" will still be NOTFOUND,
and it will return instead of continuing to "dns". Thus, the
line
hosts: mdns4_minimal [NOTFOUND=return] dns mdns4
does work because "status" will contain UNAVAIL after the
failure to find mdns4_minimal. */
./nss-skip-unavail.patch
++ [
/* Have rpcgen(1) look for cpp(1) in $PATH. */
./rpcgen-path.patch
/* Allow nixos and nix handle the locale-archive. */
./nix-locale-archive.patch
/* don't use /etc/ld.so.cache, for non-nixos systems */
./dont_use_system_ld_so_cache.patch
/* Without this patch many KDE binaries crash. */
./glibc-elf-localscope.patch
];
postPatch = ''
# Needed for glibc to build with the gnumake 3.82
# http://comments.gmane.org/gmane.linux.lfs.support/31227
sed -i 's/ot \$/ot:\n\ttouch $@\n$/' manual/Makefile
# nscd needs libgcc, and we don't want it dynamically linked
# because we don't want it to depend on bootstrap-tools libs.
echo "LDFLAGS-nscd += -static-libgcc" >> nscd/Makefile
'';
configureFlags = [
"-C"
"--enable-add-ons"
"--sysconfdir=/etc"
"--localedir=/var/run/current-system/sw/lib/locale"
"libc_cv_ssp=no"
(if kernelHeaders != null
then "--with-headers=${kernelHeaders}/include"
else "--without-headers")
(if profilingLibraries
then "--enable-profile"
else "--disable-profile")
] ++ stdenv.lib.optionals (cross != null) [
(if cross.withTLS then "--with-tls" else "--without-tls")
(if cross.float == "soft" then "--without-fp" else "--with-fp")
"--enable-kernel=2.6.0"
"--with-__thread"
] ++ stdenv.lib.optionals stdenv.isArm [
"--host=arm-linux-gnueabi"
"--build=arm-linux-gnueabi"
"--without-fp"
# To avoid linking with -lgcc_s (dynamic link)
# so the glibc does not depend on its compiler store path
"libc_cv_as_needed=no"
];
installFlags = [ "sysconfdir=$(out)/etc" ];
buildInputs = stdenv.lib.optionals (cross != null) [ gccCross ]
++ stdenv.lib.optional (mig != null) mig;
# Needed to install share/zoneinfo/zone.tab. Set to impure /bin/sh to
# prevent a retained dependency on the bootstrap tools in the stdenv-linux
# bootstrap.
BASH_SHELL = "/bin/sh";
# Workaround for this bug:
# http://sourceware.org/bugzilla/show_bug.cgi?id=411
# I.e. when gcc is compiled with --with-arch=i686, then the
# preprocessor symbol `__i686' will be defined to `1'. This causes
# the symbol __i686.get_pc_thunk.dx to be mangled.
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString (stdenv.system == "i686-linux") "-U__i686";
}
# Remove the `gccCross' attribute so that the *native* glibc store path
# doesn't depend on whether `gccCross' is null or not.
// (removeAttrs args [ "gccCross" ]) //
{
name = name + "-${version}" +
stdenv.lib.optionalString (cross != null) "-${cross.config}";
src =
if hurdHeaders != null
then fetchgit {
# Shamefully the "official" glibc won't build on GNU, so use the one
# maintained by the Hurd folks, `tschwinge/Roger_Whittaker' branch.
# See <http://www.gnu.org/software/hurd/source_repositories/glibc.html>.
url = "git://git.sv.gnu.org/hurd/glibc.git";
sha256 = "3fb3dd7030a4b6d3e144fa94c32a0c4f46f17f94e2dfbc6bef41cfc3198725ca";
rev = "d740cf9d201dc9ecb0335b0a585828dea9cce793";
}
else fetchurl {
url = "mirror://gnu/glibc/glibc-${version}.tar.bz2";
sha256 = "0fsvf5d6sib483rp7asdy8hs0dysxqkrvw316c82hsxy7vxa51bf";
};
# `fetchurl' is a function and thus should not be passed to the
# `derivation' primitive.
fetchurl = null;
# Remove absolute paths from `configure' & co.; build out-of-tree.
preConfigure = ''
export PWD_P=$(type -tP pwd)
for i in configure io/ftwtest-sh; do
# Can't use substituteInPlace here because replace hasn't been
# built yet in the bootstrap.
sed -i "$i" -e "s^/bin/pwd^$PWD_P^g"
done
${if needsPorts then "tar xvf ${srcPorts}" else ""}
mkdir ../build
cd ../build
configureScript="`pwd`/../$sourceRoot/configure"
${preConfigure}
'';
meta = {
homepage = http://www.gnu.org/software/libc/;
description = "The GNU C Library";
longDescription =
'' Any Unix-like operating system needs a C library: the library which
defines the "system calls" and other basic facilities such as
open, malloc, printf, exit...
The GNU C library is used as the C library in the GNU system and
most systems with the Linux kernel.
'';
license = "LGPLv2+";
maintainers = [ stdenv.lib.maintainers.ludo ];
#platforms = stdenv.lib.platforms.linux;
} // meta;
}
//
(if hurdHeaders != null
then {
# Work around the fact that the configure snippet that looks for
# <hurd/version.h> does not honor `--with-headers=$sysheaders' and that
# glibc expects Mach, Hurd, and pthread headers to be in the same place.
CPATH = "${hurdHeaders}/include:${machHeaders}/include:${libpthreadHeaders}/include";
# `fetchgit' is a function and thus should not be passed to the
# `derivation' primitive.
fetchgit = null;
# Install NSS stuff in the right place.
# XXX: This will be needed for all new glibcs and isn't Hurd-specific.
makeFlags = ''vardbdir="$out/var/db"'';
}
else { }))

View File

@@ -1,43 +0,0 @@
diff -Naur glibc-2.13-orig/elf/ldconfig.c glibc-2.13/elf/ldconfig.c
--- glibc-2.13-orig/elf/ldconfig.c 2011-01-17 23:34:07.000000000 -0500
+++ glibc-2.13/elf/ldconfig.c 2012-04-10 23:28:45.957492340 -0400
@@ -51,7 +51,7 @@
#endif
#ifndef LD_SO_CONF
-# define LD_SO_CONF SYSCONFDIR "/ld.so.conf"
+# define LD_SO_CONF PREFIX "/etc/ld.so.conf"
#endif
/* Get libc version number. */
diff -Naur glibc-2.13-orig/elf/Makefile glibc-2.13/elf/Makefile
--- glibc-2.13-orig/elf/Makefile 2011-01-17 23:34:07.000000000 -0500
+++ glibc-2.13/elf/Makefile 2012-04-10 23:27:05.666477442 -0400
@@ -459,11 +459,11 @@
$(objpfx)sprof: $(libdl)
$(objpfx)ldconfig: $(ldconfig-modules:%=$(objpfx)%.o)
-SYSCONF-FLAGS := -D'SYSCONFDIR="$(sysconfdir)"'
-CFLAGS-ldconfig.c = $(SYSCONF-FLAGS) -D'LIBDIR="$(libdir)"' \
+PREFIX-FLAGS := -D'PREFIX="$(prefix)"'
+CFLAGS-ldconfig.c = $(PREFIX-FLAGS) -D'LIBDIR="$(libdir)"' \
-D'SLIBDIR="$(slibdir)"' -DIS_IN_ldconfig=1
-CFLAGS-dl-cache.c = $(SYSCONF-FLAGS)
-CFLAGS-cache.c = $(SYSCONF-FLAGS)
+CFLAGS-dl-cache.c = $(PREFIX-FLAGS)
+CFLAGS-cache.c = $(PREFIX-FLAGS)
CPPFLAGS-.os += $(if $(filter $(@F),$(patsubst %,%.os,$(all-rtld-routines))),-DNOT_IN_libc=1 -DIS_IN_rtld=1)
diff -Naur glibc-2.13-orig/sysdeps/generic/dl-cache.h glibc-2.13/sysdeps/generic/dl-cache.h
--- glibc-2.13-orig/sysdeps/generic/dl-cache.h 2011-01-17 23:34:07.000000000 -0500
+++ glibc-2.13/sysdeps/generic/dl-cache.h 2012-04-10 23:28:20.077488815 -0400
@@ -29,7 +29,7 @@
#endif
#ifndef LD_SO_CACHE
-# define LD_SO_CACHE SYSCONFDIR "/ld.so.cache"
+# define LD_SO_CACHE PREFIX "/etc/ld.so.cache"
#endif
#ifndef add_system_dir

Some files were not shown because too many files have changed in this diff Show More