Compare commits

...

7 Commits

Author SHA1 Message Date
Shea Levy
448be29a21 Merge in some changes from trunk.
gcc46 is still not built with callPackage, as this causes problems during
the bootstrap

svn path=/nixpkgs/branches/stdenv-ada/; revision=26725
2011-04-06 16:20:07 +00:00
Shea Levy
28ad00775f Only copy necessary gnat binaries
svn path=/nixpkgs/branches/stdenv-ada/; revision=26718
2011-04-06 14:33:51 +00:00
Shea Levy
ef94f7d4e9 Put the right libraries into the bootstrap, bootstrap based on a bootstrap built from stdenv rather than one from gnatboot
svn path=/nixpkgs/branches/stdenv-ada/; revision=26717
2011-04-06 14:33:44 +00:00
Shea Levy
552f7b4ec8 Match nixpkgs trunk as much as possible
svn path=/nixpkgs/branches/stdenv-ada/; revision=26716
2011-04-06 14:33:35 +00:00
Shea Levy
98644029cf Get an stdenv with gnat-enabled gcc 4.6 to compile
svn path=/nixpkgs/branches/stdenv-ada/; revision=26689
2011-04-04 22:52:47 +00:00
Shea Levy
8afe8cfff0 First attempt at an Ada-enabled bootstrap
svn path=/nixpkgs/branches/stdenv-ada/; revision=26688
2011-04-04 22:46:51 +00:00
Shea Levy
d76f7de2da Get gnat to build with C++ support
svn path=/nixpkgs/branches/stdenv-ada/; revision=26687
2011-04-04 22:46:43 +00:00
8 changed files with 42 additions and 34 deletions

View File

@@ -8,9 +8,7 @@ mkdir $NIX_FIXINC_DUMMY
# libstdc++ needs this; otherwise it will use /lib/cpp, which is a Bad
# Thing.
export CPP="gcc -E"
if test "$langCC" = "1"; then
export CXXCPP="gcc -E" #We only want this if C++ is enabled
fi
export CXXCPP="g++ -E"
if test "$staticCompiler" = "1"; then
EXTRA_LDFLAGS="-static"

View File

@@ -1,7 +1,7 @@
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langFortran ? false, langTreelang ? false
, langJava ? false
, langAda ? false
, langAda ? true
, langVhdl ? false
, langGo ? false
, profiledCompiler ? false
@@ -34,7 +34,6 @@ assert langTreelang -> bison != null && flex != null;
assert langJava -> zip != null && unzip != null
&& zlib != null && boehmgc != null
&& perl != null; # for `--enable-java-home'
assert langAda -> gnatboot != null;
assert langVhdl -> gnat != null;
# LTO needs libelf and zlib.
@@ -132,7 +131,7 @@ in
assert gtk != null -> (filter (x: x == null) xlibs) == [];
stdenv.mkDerivation ({
name = "${name}-${version}" + crossNameAddon;
name = "${name}${if stripped then "" else "-debug"}-${version}" + crossNameAddon;
builder = ./builder.sh;
@@ -200,29 +199,27 @@ stdenv.mkDerivation ({
else null;
inherit noSysDirs profiledCompiler staticCompiler langJava crossStageStatic
libcCross crossMingw langCC;
libcCross crossMingw;
buildNativeInputs = [ texinfo which ]
++ optional (perl != null) perl;
++ optional langJava perl;
buildInputs = [ gmp mpfr mpc libelf gettext ]
++ (optional (ppl != null) ppl)
++ (optional (cloogppl != null) cloogppl)
++ (optional (cloog != null) cloog)
++ (optionals langTreelang [bison flex])
++ (optional (zlib != null) zlib)
++ (optional (boehmgc != null) boehmgc)
++ (optionals langJava [zip unzip])
++ (optionals langJava [ boehmgc zip unzip ])
++ (optionals javaAwtGtk [gtk pkgconfig libart_lgpl] ++ xlibs)
++ (optionals (cross != null) [binutilsCross])
++ (optionals langAda [gnatboot])
++ (optionals (gnatboot != null) [gnatboot])
++ (optionals langVhdl [gnat])
;
configureFlagsArray = stdenv.lib.optionals
(ppl != null && ppl.dontDisableStatic == true)
[ "--with-host-libstdcxx=-lstdc++ -lgcc_s"
"--with-stage1-libs=-lstdc++ -lgcc_s" ];
[ "--with-host-libstdcxx=-lstdc++ -lgcc_s" ];
configureFlags = "
${if enableMultilib then "" else "--disable-multilib"}

View File

@@ -2,7 +2,7 @@
let
version = "0.11";
staticFlags = if static then " --enable-static --disable-shared" else "";
staticFlags = if static then " --enable-static --disable-shared --disable-watchdog" else "";
in
stdenv.mkDerivation rec {
name = "ppl-${version}";

View File

@@ -4,7 +4,7 @@
{
bootstrapTools = {
url = http://nixos.org/tarballs/stdenv-linux/x86_64/r23302/bootstrap-tools.cpio.bz2;
sha256 = "0w89kqhx47yl0jifp2vffp073pyrqha5f312kp971smi4h41drna";
url = http://www.shealevy.com/nix/1/bootstrap-tools.cpio.bz2;
sha256 = "1x9vqycqg41l3f167scl5nmflgmysx4a65afdz7zds4m0y27va0g";
};
}

View File

@@ -212,17 +212,21 @@ rec {
};
gccWithStaticLibs = stdenvLinuxBoot3Pkgs.gcc.gcc.override (rec {
ppl = stdenvLinuxBoot3Pkgs.ppl.override {
static = true;
gmpxx = stdenvLinuxBoot3Pkgs.gmpxx.override {
static = true;
};
};
cloogppl = stdenvLinuxBoot3Pkgs.cloogppl.override {
inherit ppl;
static = true;
};
});
ppl = stdenvLinuxBoot3Pkgs.ppl0_11.override {
static = true;
gmpxx = stdenvLinuxBoot3Pkgs.gmpxx.override {
static = true;
};
};
cloog = stdenvLinuxBoot3Pkgs.cloog.override {
isl = stdenvLinuxBoot3Pkgs.isl.override {
static = true;
};
static = true;
};
});
# 8) Construct a fourth stdenv identical to the second, except that
# this one uses the dynamically linked GCC and Binutils from step

View File

@@ -77,6 +77,7 @@ rec {
CLEAR
CONFIG_STATIC y
CONFIG_CPIO y
# (shlevy) Are these necessary?
CONFIG_FEATURE_CPIO_O y
CONFIG_FEATURE_CPIO_P y
'';
@@ -140,6 +141,7 @@ rec {
cp -d ${gcc.gcc}/bin/gcc $out/bin
cp -d ${gcc.gcc}/bin/cpp $out/bin
cp -d ${gcc.gcc}/bin/g++ $out/bin
cp -d ${gcc.gcc}/bin/gnat{make,bind,link} $out/bin
cp -d ${gcc.gcc}/lib*/libgcc_s.so* $out/lib
cp -d ${gcc.gcc}/lib*/libstdc++.so* $out/lib
cp -rd ${gcc.gcc}/lib/gcc $out/lib
@@ -159,8 +161,8 @@ rec {
cp -d ${gmpxx}/lib/libgmp*.so* $out/lib
cp -d ${mpfr}/lib/libmpfr*.so* $out/lib
cp -d ${ppl}/lib/libppl*.so* $out/lib
cp -d ${cloogppl}/lib/libcloog*.so* $out/lib
cp -d ${ppl0_11}/lib/libppl*.so* $out/lib
cp -d ${cloog}/lib/libcloog*.so* $out/lib
cp -d ${mpc}/lib/libmpc*.so* $out/lib
cp -d ${zlib}/lib/libz.so* $out/lib
cp -d ${libelf}/lib/libelf.so* $out/lib
@@ -182,6 +184,7 @@ rec {
nuke-refs $out/bin/*
nuke-refs $out/lib/*
nuke-refs $out/lib/gcc/*/*/adalib/*
nuke-refs $out/libexec/gcc/*/*/*
mkdir $out/.pack
@@ -218,8 +221,9 @@ rec {
buildCommand = ''
${build}/in-nixpkgs/mkdir $out
${build}/in-nixpkgs/bzip2 -d < ${build}/on-server/bootstrap-tools.cpio.bz2 | (cd $out && ${build}/in-nixpkgs/cpio -V -i)
${build}/in-nixpkgs/bzip2 -d < ${build}/on-server/bootstrap-tools.cpio.bz2 | (cd $out && ${build}/in-nixpkgs/cpio -v -i)
set +e
for i in $out/bin/* $out/libexec/gcc/*/*/*; do
echo patching $i
if ! test -L $i; then
@@ -227,6 +231,7 @@ rec {
$out/bin/patchelf --set-interpreter $out/lib/ld-linux*.so.2 --set-rpath $out/lib --force-rpath $i
fi
done
set -e
# Fix the libc linker script.
for i in $out/lib/libc.so; do

View File

@@ -20,6 +20,7 @@ fi
# use a copy of patchelf.
LD_LIBRARY_PATH=$out/lib $LD_BINARY $out/bin/cp $out/bin/patchelf .
set +e
for i in $out/bin/* $out/libexec/gcc/*/*/*; do
echo patching $i
if ! test -L $i; then
@@ -29,6 +30,7 @@ for i in $out/bin/* $out/libexec/gcc/*/*/*; do
$out/bin/patchelf --set-interpreter $LD_BINARY --set-rpath $out/lib --force-rpath $i
fi
done
set -e
for i in $out/lib/librt* ; do
echo patching $i
if ! test -L $i; then

View File

@@ -1128,6 +1128,8 @@ let
ppl = callPackage ../development/libraries/ppl { };
ppl0_11 = callPackage ../development/libraries/ppl/0.11.nix { };
/* WARNING: this version is unsuitable for using with a setuid wrapper */
ppp = builderDefsPackage (import ../tools/networking/ppp) {
};
@@ -1598,7 +1600,7 @@ let
gambit = callPackage ../development/compilers/gambit { };
gcc = gcc45;
gcc = gcc46;
gcc295 = wrapGCC (import ../development/compilers/gcc-2.95 {
inherit fetchurl stdenv noSysDirs;
@@ -1681,7 +1683,7 @@ let
(makeOverridable (import ../development/compilers/gcc-4.6) {
inherit fetchurl stdenv texinfo gmp mpfr mpc libelf zlib
cloog gettext which noSysDirs;
ppl = callPackage ../development/libraries/ppl/0.11.nix { };
ppl = ppl0_11;
binutilsCross = binutilsCross;
libcCross = libcCross;
profiledCompiler = false;
@@ -1754,7 +1756,7 @@ let
gcc46_real = lowPrio (wrapGCC (makeOverridable (import ../development/compilers/gcc-4.6) {
inherit fetchurl stdenv texinfo gmp mpfr mpc libelf zlib perl
cloog gettext which noSysDirs;
ppl = callPackage ../development/libraries/ppl/0.11.nix { };
ppl = ppl0_11;
# bootstrapping a profiled compiler does not work in the sheevaplug:
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43944