1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-03 11:02:05 +00:00

* The `patch' command is now part of stdenv, so it no longer needs to

be passed to derivations that need to apply patches.
* GCC 3.4 is now the default compiler (old GCC renamed to `gcc-3.3').
* The temporary GCCs built during the stdenvLinux bootstrap are now
  built without C++ support and without profiling.
* Remove fixincl in GCC 3.4 to prevent a retained dependency on the
  previous GCC.
* Always set $prefix in setup.sh, even when there is no configure
  script.

svn path=/nixpkgs/trunk/; revision=1444
This commit is contained in:
Eelco Dolstra 2004-09-18 17:23:18 +00:00
parent e31d1dd960
commit 1ab4a9324c
15 changed files with 65 additions and 79 deletions

View file

@ -14,22 +14,6 @@
...
* Subtle problems can occur if the Nix store directory or one of its
parents is a symlink. E.g., purity checks can barf:
impure path `/data/nix/store/099cd9aee7d056a9922fd6dd116a3f5c-gcc-3.3.3/bin/../lib/gcc-lib/i686-pc-linux-gnu/3.3.3/crtbegin.o' used in link
(This happened because /nix was a symlink to /data/nix.) Maybe we
should disallow this entirely, since, exactly because it is
perfectly legal for a builder to expand a symlink, we can end up
with derivates referring to paths that existed in the build
environment but not in the target environment.
Disallowing this can be highly inconvenient, since it makes it
harder to move the Nix store to a different file system. (On Linux,
`bind' mounts can help here.)
* In libXt:
/bin/sh ./libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I. -DXTHREADS -DXUSE_MTSAFE_API -I/nix/store/aadf0bd4a908da11d14f6538503b8408-libX11-6.2.1/include -I/nix/store/ba366e3b944ead64ec9b0490bb615874-xproto-6.6.1/include -I./include/X11 -g -O2 -c -o ActionHook.lo `test -f 'ActionHook.c' || echo './'`ActionHook.c
@ -69,4 +53,9 @@ stdenv.mkDerivation {
* Add "exit 0" at the end of configure of rte package.
* In stdenv/nix/path.nix: remove gcc.
* Starting at gcc 3.4, all C programs incur a retained dependency on
gcc through the rpath stored in the executable, even though the
executable doesn't use against any library in gcc. The reason is
that the gcc passes a `-lgcc_s' switch to the linker. Solution:
patch the linker so that rpaths are only added for libraries that we
actually use.

View file

@ -11,10 +11,6 @@
* After building gcc, filter out references to /tmp/nix... in
.../lib/libsupc++.la and .../lib/libstdc++.la
* diffutils retains a dependency on coreutils/bin/pr; causes stdenv to
depend on 2 copies of coreutils (the first one impure in
stdenv-nix-linux!)
* change dontMake & dontMakeInstall into dontBuild and dontInstall in

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, patch, noSysDirs
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langF77 ? false
}:
@ -13,6 +13,5 @@ stdenv.mkDerivation {
};
# !!! apply only if noSysDirs is set
patches = [./no-sys-dirs.patch];
buildInputs = [patch];
inherit noSysDirs langC langCC langF77;
}

View file

@ -71,6 +71,10 @@ 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
}

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, patch, noSysDirs
{ stdenv, fetchurl, noSysDirs
, langC ? true, langCC ? true, langF77 ? false
, profiledCompiler ? false
}:
@ -14,6 +14,5 @@ stdenv.mkDerivation {
};
# !!! apply only if noSysDirs is set
patches = [./no-sys-dirs.patch];
buildInputs = [patch];
inherit noSysDirs langC langCC langF77 profiledCompiler;
}

View file

@ -1,4 +1,4 @@
{stdenv, fetchurl, patch}:
{stdenv, fetchurl}:
stdenv.mkDerivation {
name = "gnumake-3.80";
@ -7,5 +7,4 @@ stdenv.mkDerivation {
md5 = "0bbd1df101bc0294d440471e50feca71";
};
patches = [./log.diff];
buildInputs = [patch];
}

View file

@ -424,6 +424,14 @@ configureW() {
$preConfigure
fi
if test -z "$prefix"; then
prefix="$out";
fi
if test "$useTempPrefix" = "1"; then
prefix="$NIX_BUILD_TOP/tmp_prefix";
fi
if test -z "$configureScript"; then
configureScript=./configure
if ! test -x $configureScript; then
@ -439,14 +447,6 @@ configureW() {
done
fi
if test -z "$prefix"; then
prefix="$out";
fi
if test "$useTempPrefix" = "1"; then
prefix="$NIX_BUILD_TOP/tmp_prefix";
fi
if test -z "$dontAddPrefix"; then
configureFlags="--prefix=$prefix $configureFlags"
fi

View file

@ -2,7 +2,10 @@
# identifier and a standard build environment, returns the set of all
# packages provided by the Nix Package Collection.
{stdenv, bootCurl, noSysDirs ? true}:
{ stdenv, bootCurl, noSysDirs ? true
, gccWithCC ? true
, gccWithProfiling ? true
}:
rec {
@ -41,7 +44,7 @@ rec {
};
diffutils = (import ../tools/text/diffutils) {
inherit fetchurl stdenv;
inherit fetchurl stdenv coreutils;
};
gnupatch = (import ../tools/text/gnupatch) {
@ -218,7 +221,7 @@ rec {
};
gnumake = (import ../development/tools/build-managers/gnumake) {
inherit fetchurl stdenv patch;
inherit fetchurl stdenv;
};
bison = (import ../development/tools/parsing/bison) {
@ -242,8 +245,10 @@ rec {
m4 = gnum4;
};
gcc = (import ../development/compilers/gcc) {
gcc = (import ../development/compilers/gcc-3.4) {
inherit fetchurl stdenv noSysDirs;
langCC = gccWithCC;
profiledCompiler = gccWithProfiling;
};
gcc_static = (import ../stdenv/nix-linux/gcc-static) {
@ -254,7 +259,7 @@ rec {
nativeTools = false;
nativeGlibc = false;
gcc = (import ../development/compilers/gcc-3.4) {
inherit fetchurl stdenv patch noSysDirs;
inherit fetchurl stdenv noSysDirs;
profiledCompiler = true;
};
binutils = stdenv.gcc.binutils;
@ -266,7 +271,7 @@ rec {
nativeTools = false;
nativeGlibc = false;
gcc = (import ../development/compilers/gcc-2.95) {
inherit fetchurl stdenv patch noSysDirs;
inherit fetchurl stdenv noSysDirs;
};
binutils = stdenv.gcc.binutils;
glibc = stdenv.gcc.glibc;
@ -277,7 +282,7 @@ rec {
name = "g77";
nativeTools = false;
nativeGlibc = false;
gcc = (import ../development/compilers/gcc) {
gcc = (import ../development/compilers/gcc-3.3) {
inherit fetchurl stdenv noSysDirs;
langF77 = true;
langCC = false;
@ -399,7 +404,7 @@ rec {
};
realPerl = (import ../development/interpreters/perl) {
inherit fetchurl stdenv patch;
inherit fetchurl stdenv;
};
sysPerl = (import ../development/interpreters/sys-perl) {
@ -451,7 +456,8 @@ rec {
};
glibc = (import ../development/libraries/glibc) {
inherit fetchurl stdenv kernelHeaders patch;
inherit fetchurl stdenv kernelHeaders;
installLocales = false;
};
aterm = (import ../development/libraries/aterm) {
@ -504,7 +510,7 @@ rec {
zlib = if stdenv.system == "powerpc-darwin" then
(import ../development/libraries/zlib-mac-fix) {
inherit fetchurl stdenv patch;
inherit fetchurl stdenv;
}
else
(import ../development/libraries/zlib) {
@ -609,7 +615,7 @@ rec {
};
xlibs = (import ../development/libraries/xlibs) {
inherit fetchurl stdenv pkgconfig freetype expat patch;
inherit fetchurl stdenv pkgconfig freetype expat;
};
mesa = (import ../development/libraries/mesa) {
@ -672,11 +678,11 @@ rec {
};
utillinux = (import ../os-specific/linux/util-linux) {
inherit fetchurl stdenv patch;
inherit fetchurl stdenv;
};
sysvinit = (import ../os-specific/linux/sysvinit) {
inherit fetchurl stdenv patch;
inherit fetchurl stdenv;
};
e2fsprogs = (import ../os-specific/linux/e2fsprogs) {
@ -726,7 +732,7 @@ rec {
};
subversionWithJava = (import ../applications/version-management/subversion-1.1rc) {
inherit fetchurl stdenv openssl db4 expat patch;
inherit fetchurl stdenv openssl db4 expat;
swig = swigWithJava;
localServer = true;
httpServer = false;
@ -841,7 +847,7 @@ rec {
### MISC
uml = (import ../misc/uml) {
inherit fetchurl stdenv perl patch;
inherit fetchurl stdenv perl;
m4 = gnum4;
};

View file

@ -28,33 +28,41 @@
inherit genericStdenv gccWrapper;
};
stdenvNativePkgs = allPackages {
stdenvNativePkgsFun = bootstrap: allPackages {
stdenv = stdenvNative;
bootCurl = null;
noSysDirs = false;
gccWithCC = !bootstrap;
gccWithProfiling = !bootstrap;
};
stdenvNativePkgs = stdenvNativePkgsFun false;
# The Nix build environment.
stdenvNix = (import ../stdenv/nix) {
stdenvNixFun = bootstrap: (import ../stdenv/nix) {
stdenv = stdenvNative;
pkgs = stdenvNativePkgs;
pkgs = stdenvNativePkgsFun bootstrap;
inherit genericStdenv gccWrapper;
};
stdenvNixPkgs = allPackages {
stdenv = stdenvNix;
bootCurl = stdenvNativePkgs.curl;
stdenvNix = stdenvNixFun false;
stdenvNixPkgsFun = bootstrap: allPackages {
stdenv = stdenvNixFun bootstrap;
bootCurl = (stdenvNativePkgsFun bootstrap).curl;
noSysDirs = false;
};
stdenvNixPkgs = stdenvNixPkgs false;
# The Linux build environment is a fully bootstrapped Nix
# environment, that is, it should contain no external references.
# 1) Build glibc in the Nix build environment. The result is
# pure.
stdenvLinuxGlibc = stdenvNixPkgs.glibc;
stdenvLinuxGlibc = (stdenvNixPkgsFun true).glibc;
# 2) Construct a stdenv consisting of the Nix build environment, but
# with a gcc-wrapper that causes linking against the glibc from
@ -64,7 +72,7 @@
# `-lncurses').
stdenvLinuxBoot1 = (import ../stdenv/nix-linux) {
stdenv = stdenvNative;
pkgs = stdenvNativePkgs;
pkgs = stdenvNativePkgsFun true;
glibc = stdenvLinuxGlibc;
inherit genericStdenv gccWrapper;
};
@ -76,8 +84,10 @@
# *doesn't* search in `/lib' etc. So these programs won't work.
stdenvLinuxBoot1Pkgs = allPackages {
stdenv = stdenvLinuxBoot1;
bootCurl = stdenvNativePkgs.curl;
bootCurl = (stdenvNativePkgsFun true).curl;
noSysDirs = true;
gccWithCC = false;
gccWithProfiling = false;
};
# 4) Therefore we build a new standard environment which is the same
@ -86,7 +96,7 @@
# system directories), things built by this stdenv should be pure.
stdenvLinuxBoot2 = (import ../stdenv/nix-linux) {
stdenv = stdenvLinuxBoot1;
pkgs = stdenvNativePkgs // {
pkgs = (stdenvNativePkgsFun true) // {
inherit (stdenvLinuxBoot1Pkgs) gcc binutils;
};
glibc = stdenvLinuxGlibc;
@ -96,7 +106,7 @@
# 5) So these packages should be pure.
stdenvLinuxBoot2Pkgs = allPackages {
stdenv = stdenvLinuxBoot2;
bootCurl = stdenvNativePkgs.curl;
bootCurl = (stdenvNativePkgsFun true).curl;
};
# 6) Finally we can construct the Nix build environment from the
@ -138,7 +148,7 @@
# (essentially it's just the native environment).
stdenvDarwin = (import ../stdenv/darwin) {
stdenv = stdenvInitial;
genericStdenv = import ../stdenv/generic-branch;
genericStdenv = import ../stdenv/generic;
inherit gccWrapper;
};
@ -148,20 +158,4 @@
noSysDirs = false;
};
# Testing the new stdenv-linux (TODO: remove this eventually).
stdenvLinuxTest = (import ../stdenv/nix-linux) {
stdenv = stdenvLinuxBoot2;
pkgs = stdenvLinuxBoot2Pkgs;
glibc = stdenvLinuxGlibc;
genericStdenv = import ../stdenv/generic-branch;
inherit gccWrapper;
};
stdenvDarwinTest = (import ../stdenv/darwin) {
stdenv = stdenvInitial;
genericStdenv = import ../stdenv/generic-branch;
inherit gccWrapper;
};
}