mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-27 01:13:05 +00:00
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 =
|
||||
if (stdenv.system == "i586-pc-gnu"
|
||||
|| (libcCross != null) # e.g., building `gcc.hostDrv'
|
||||
|| (cross != null && cross.config == "i586-pc-gnu"
|
||||
&& libcCross != null))
|
||||
then
|
||||
# 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.
|
||||
assert libcCross != null -> libpthreadCross != null;
|
||||
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";
|
||||
i386_gnu_h = "gcc/config/i386/gnu.h";
|
||||
extraCPPDeps =
|
||||
@ -186,7 +188,7 @@ stdenv.mkDerivation ({
|
||||
# On NixOS, use the right path to the dynamic linker instead of
|
||||
# `/lib/ld*.so'.
|
||||
let
|
||||
libc = if (cross != null && 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
|
||||
|
@ -1847,6 +1847,16 @@ let
|
||||
# bootstrapping a profiled compiler does not work in the sheevaplug:
|
||||
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944
|
||||
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user