diff options
Diffstat (limited to 'pkgs/development/libraries/glibc/builder.sh')
-rwxr-xr-x | pkgs/development/libraries/glibc/builder.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pkgs/development/libraries/glibc/builder.sh b/pkgs/development/libraries/glibc/builder.sh new file mode 100755 index 0000000000000..7503e73a171e2 --- /dev/null +++ b/pkgs/development/libraries/glibc/builder.sh @@ -0,0 +1,26 @@ +#! /bin/sh + +# glibc cannot have itself in its rpath. +export NIX_NO_SELF_RPATH=1 +. $stdenv/setup || exit 1 + +tar xvfj $glibcSrc || exit 1 +(cd glibc-* && tar xvfj $linuxthreadsSrc) || exit 1 + +(cd glibc-* && patch -p1 < $vaargsPatch) || exit 1 + +mkdir build || exit 1 +cd build || exit 1 +LDFLAGS=-Wl,-S ../glibc-*/configure --prefix=$out --enable-add-ons --disable-profile || exit 1 + +make || exit 1 +make install || exit 1 +make localedata/install-locales || exit 1 +strip -S $out/lib/*.a $out/lib/*.so $out/lib/gconv/*.so +strip -s $out/bin/* $out/sbin/* $out/libexec/* + +ln -sf /etc/ld.so.cache $out/etc/ld.so.cache || exit 1 + +(cd $out/include && ln -s $kernelHeaders/include/* .) || exit 1 + +exit 0 |