7534cbe4b8
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
38 lines
1 KiB
Nix
38 lines
1 KiB
Nix
{ stdenv, fetchurl, kernelHeaders
|
|
, installLocales ? true
|
|
, profilingLibraries ? false
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "glibc-2.5";
|
|
builder = ./builder.sh;
|
|
|
|
src = fetchurl {
|
|
url = http://ftp.gnu.org/gnu/glibc/glibc-2.5.tar.bz2;
|
|
md5 = "1fb29764a6a650a4d5b409dda227ac9f";
|
|
};
|
|
|
|
patches = [ ./glibc-pwd.patch ./glibc-getcwd-param-MAX.patch ./glibc-inline.patch ./x86-fnstsw.patch ];
|
|
|
|
inherit kernelHeaders installLocales;
|
|
|
|
inherit (stdenv) is64bit;
|
|
|
|
configureFlags="--enable-add-ons
|
|
--with-headers=${kernelHeaders}/include
|
|
--disable-sanity-checks
|
|
${if profilingLibraries then "--enable-profile" else "--disable-profile"}";
|
|
|
|
# Workaround for this bug:
|
|
# http://sourceware.org/bugzilla/show_bug.cgi?id=411
|
|
# I.e. when gcc is compiled with --with-arch=i686, then the
|
|
# preprocessor symbol `__i686' will be defined to `1'. This causes
|
|
# the symbol __i686.get_pc_thunk.dx to be mangled.
|
|
NIX_CFLAGS_COMPILE = "-U__i686";
|
|
|
|
meta = {
|
|
homepage = http://www.gnu.org/software/libc/;
|
|
description = "The GNU C Library";
|
|
};
|
|
}
|