* gcc-wrapper: separately store the flags necessary to find GCC and
Glibc. This is useful when building GCC. * gcc-wrapper: the dynamic linker has a different name on x86_64 and powerpc. * gcc-wrapper: "glibc" -> "libc", because someday we might support different C libraries. * gcc: don't do a multilib build (e.g., 32-bit support on x86_64), don't need it. * gcc: merge in support for static builds. * gcc: various simplifications in the compiler/linker flags, hope they work. svn path=/nixpkgs/trunk/; revision=6823
This commit is contained in:
@@ -48,10 +48,12 @@ let
|
||||
|
||||
binutils = pkgsDiet.binutils217;
|
||||
|
||||
gcc = import ../../development/compilers/gcc-static-4.1 {
|
||||
gcc = import ../../development/compilers/gcc-4.1 {
|
||||
inherit (pkgs) fetchurl stdenv;
|
||||
profiledCompiler = false;
|
||||
noSysDirs = true;
|
||||
profiledCompiler = true;
|
||||
langCC = false;
|
||||
staticCompiler = true;
|
||||
};
|
||||
|
||||
curl = pkgsDiet.realCurl;
|
||||
|
||||
@@ -65,11 +65,21 @@ rec {
|
||||
{gcc ? staticGCC, glibc, binutils, shell ? ""}:
|
||||
(import ../../build-support/gcc-wrapper) {
|
||||
nativeTools = false;
|
||||
nativeGlibc = false;
|
||||
nativeLibc = false;
|
||||
inherit gcc binutils glibc shell;
|
||||
stdenv = stdenvInitial;
|
||||
};
|
||||
|
||||
wrapGCC2 =
|
||||
{gcc ? staticGCC, glibc, binutils, shell ? ""}:
|
||||
(import ../../build-support/gcc-wrapper-new) {
|
||||
nativeTools = false;
|
||||
nativeLibc = false;
|
||||
inherit gcc binutils shell;
|
||||
libc = glibc;
|
||||
stdenv = stdenvInitial;
|
||||
};
|
||||
|
||||
|
||||
# The "fake" standard environment used to build "real" standard
|
||||
# environments. It consists of just the basic statically linked
|
||||
@@ -140,7 +150,7 @@ rec {
|
||||
# statically linked tools.
|
||||
stdenvLinuxBoot2 = removeAttrs (stdenvBootFun {
|
||||
staticGlibc = false;
|
||||
gcc = wrapGCC {binutils = staticBinutils; glibc = stdenvLinuxGlibc;};
|
||||
gcc = wrapGCC2 {binutils = staticBinutils; glibc = stdenvLinuxGlibc;};
|
||||
extraAttrs = {inherit curl; glibc = stdenvLinuxGlibc;};
|
||||
}) ["gcc" "binutils"];
|
||||
|
||||
@@ -157,7 +167,7 @@ rec {
|
||||
# 5. The other tools (e.g. coreutils) are still static.
|
||||
stdenvLinuxBoot3 = stdenvBootFun {
|
||||
staticGlibc = false;
|
||||
gcc = wrapGCC {
|
||||
gcc = wrapGCC2 {
|
||||
# inherit (stdenvLinuxBoot2Pkgs) binutils;
|
||||
binutils = stdenvLinuxBoot2Pkgs.binutils217;
|
||||
glibc = stdenvLinuxGlibc;
|
||||
|
||||
Reference in New Issue
Block a user