diff options
author | Peter Simons <simons@cryp.to> | 2009-06-24 20:10:51 +0000 |
---|---|---|
committer | Peter Simons <simons@cryp.to> | 2009-06-24 20:10:51 +0000 |
commit | 7534cbe4b81a6df31e865f978f4bf799bfe6745f (patch) | |
tree | 40d0eec9fbd95ed2c27387f31520cb7bb338a36b /pkgs/build-support/gcc-wrapper | |
parent | 8f0f5c403d2b6db5c3d1a65e7938e08730851829 (diff) | |
download | nixlib-7534cbe4b81a6df31e865f978f4bf799bfe6745f.tar nixlib-7534cbe4b81a6df31e865f978f4bf799bfe6745f.tar.gz nixlib-7534cbe4b81a6df31e865f978f4bf799bfe6745f.tar.bz2 nixlib-7534cbe4b81a6df31e865f978f4bf799bfe6745f.tar.lz nixlib-7534cbe4b81a6df31e865f978f4bf799bfe6745f.tar.xz nixlib-7534cbe4b81a6df31e865f978f4bf799bfe6745f.tar.zst nixlib-7534cbe4b81a6df31e865f978f4bf799bfe6745f.zip |
Define "brokenRedHatKernel = true" in $NIXPKGS_CONFIG to build a system that
works on Red Hat Linux, i.e. that is based on glibc version 2.5. Furthermore, this patch fixes a number of gcc 4.3.3 build errors in glibc 2.5 that occur on both x86 and x86_64. The older version of this library is still useful for running Nix on a Red Hat host. Newer version of glibc fail to detect the kernel's capabilities correctly (due to mad patches applied to the kernel by Red Hat). The individual changes are: * Re-activated glibc 2.5 in all-packages.nix. * Fix incomplete header search path in bootstrap tools. Gcc-wrapper sets "-B<prefix>" to tell the compiler about its installation root. Unfortunately, the setting doesn't add $gcc/lib/gcc/*/*/include-fixed to the search path. That directory is required, however, because it contains the system-specific "limits.h" file, and the glibc 2.5 builds tries to find that file via #include_next. * Support intrinsic functions like __signbit() or atof() correctly to avoid compile-time conflicts. * Switch to NPTL. Linuxthreads is no longer supported. * Added a meta attribute to glibc package. * Updated nixUnstable to version 0.13pre15614 from trunk. The previous version failed regression tests. * Fix more strict type checking in binutils since 2.18.50.0.3. Without this patch, the build failed on x86, saying: ../sysdeps/i386/fpu/ftestexcept.c: Assembler messages: ../sysdeps/i386/fpu/ftestexcept.c:33: Error: suffix or operands invalid for `fnstsw' svn path=/nixpkgs/branches/stdenv-updates/; revision=16037
Diffstat (limited to 'pkgs/build-support/gcc-wrapper')
-rw-r--r-- | pkgs/build-support/gcc-wrapper/builder.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/pkgs/build-support/gcc-wrapper/builder.sh b/pkgs/build-support/gcc-wrapper/builder.sh index 0691b4273254..0fe3f3768f2a 100644 --- a/pkgs/build-support/gcc-wrapper/builder.sh +++ b/pkgs/build-support/gcc-wrapper/builder.sh @@ -17,8 +17,15 @@ if test -z "$nativeLibc"; then # against the crt1.o from our own glibc, rather than the one in # /usr/lib. (This is only an issue when using an `impure' # compiler/linker, i.e., one that searches /usr/lib and so on.) - echo "-B$libc/lib/ -idirafter $libc/include" > $out/nix-support/libc-cflags - + # + # Unfortunately, setting -B appears to override the default search + # path. Thus, the gcc-specific "../includes-fixed" directory is + # now longer searched and glibc's <limits.h> header fails to + # compile, because it uses "#include_next <limits.h>" to find the + # limits.h file in ../includes-fixed. To remedy the problem, + # another -idirafter is necessary to add that directory again. + echo "-B$libc/lib/ -idirafter $libc/include -idirafter $gcc/lib/gcc/*/*/include-fixed" > $out/nix-support/libc-cflags + echo "-L$libc/lib" > $out/nix-support/libc-ldflags # The dynamic linker is passed in `ldflagsBefore' to allow |