GCC 4.5: Allow `libcCross != null && cross == null' for `gcc.hostDrv'.
svn path=/nixpkgs/trunk/; revision=30401
This commit is contained in:
parent
2741c168fe
commit
ea3ac07d92
|
@ -147,13 +147,15 @@ stdenv.mkDerivation ({
|
||||||
|
|
||||||
postPatch =
|
postPatch =
|
||||||
if (stdenv.system == "i586-pc-gnu"
|
if (stdenv.system == "i586-pc-gnu"
|
||||||
|
|| (libcCross != null) # e.g., building `gcc.hostDrv'
|
||||||
|| (cross != null && cross.config == "i586-pc-gnu"
|
|| (cross != null && cross.config == "i586-pc-gnu"
|
||||||
&& libcCross != null))
|
&& libcCross != null))
|
||||||
then
|
then
|
||||||
# On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not
|
# On GNU/Hurd glibc refers to Hurd & Mach headers and libpthread is not
|
||||||
# in glibc, so add the right `-I' flags to the default spec string.
|
# in glibc, so add the right `-I' flags to the default spec string.
|
||||||
|
assert libcCross != null -> libpthreadCross != null;
|
||||||
let
|
let
|
||||||
libc = if cross != null then libcCross else stdenv.glibc;
|
libc = if libcCross != null then libcCross else stdenv.glibc;
|
||||||
gnu_h = "gcc/config/gnu.h";
|
gnu_h = "gcc/config/gnu.h";
|
||||||
i386_gnu_h = "gcc/config/i386/gnu.h";
|
i386_gnu_h = "gcc/config/i386/gnu.h";
|
||||||
extraCPPDeps =
|
extraCPPDeps =
|
||||||
|
@ -186,7 +188,7 @@ stdenv.mkDerivation ({
|
||||||
# On NixOS, use the right path to the dynamic linker instead of
|
# On NixOS, use the right path to the dynamic linker instead of
|
||||||
# `/lib/ld*.so'.
|
# `/lib/ld*.so'.
|
||||||
let
|
let
|
||||||
libc = if (cross != null && libcCross != null) then libcCross else stdenv.gcc.libc;
|
libc = if (libcCross != null) then libcCross else stdenv.gcc.libc;
|
||||||
in
|
in
|
||||||
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
|
'' echo "fixing the \`GLIBC_DYNAMIC_LINKER' and \`UCLIBC_DYNAMIC_LINKER' macros..."
|
||||||
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
|
for header in "gcc/config/"*-gnu.h "gcc/config/"*"/"*.h
|
||||||
|
|
|
@ -1847,6 +1847,16 @@ let
|
||||||
# bootstrapping a profiled compiler does not work in the sheevaplug:
|
# bootstrapping a profiled compiler does not work in the sheevaplug:
|
||||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
|
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
|
||||||
profiledCompiler = if stdenv.system == "armv5tel-linux" then false else true;
|
profiledCompiler = if stdenv.system == "armv5tel-linux" then false else true;
|
||||||
|
|
||||||
|
# When building `gcc.hostDrv' (a "Canadian cross", with host == target
|
||||||
|
# and host != build), `cross' must be null but the cross-libc must still
|
||||||
|
# be passed.
|
||||||
|
cross = null;
|
||||||
|
libcCross = if crossSystem != null then libcCross else null;
|
||||||
|
libpthreadCross =
|
||||||
|
if crossSystem != null && crossSystem.config == "i586-pc-gnu"
|
||||||
|
then gnu.libpthreadCross
|
||||||
|
else null;
|
||||||
}));
|
}));
|
||||||
|
|
||||||
gcc46_real = lowPrio (wrapGCC (callPackage ../development/compilers/gcc-4.6 {
|
gcc46_real = lowPrio (wrapGCC (callPackage ../development/compilers/gcc-4.6 {
|
||||||
|
|
Loading…
Reference in New Issue