2003-11-02 23:25:26 +01:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
# glibc cannot have itself in its rpath.
|
|
|
|
export NIX_NO_SELF_RPATH=1
|
2004-03-09 11:59:55 +01:00
|
|
|
. $stdenv/setup
|
2003-11-02 23:25:26 +01:00
|
|
|
|
2004-03-09 11:59:55 +01:00
|
|
|
tar xvfj $glibcSrc
|
|
|
|
(cd glibc-* && tar xvfj $linuxthreadsSrc)
|
2003-11-02 23:25:26 +01:00
|
|
|
|
2004-03-09 11:59:55 +01:00
|
|
|
(cd glibc-* && patch -p1 < $vaargsPatch)
|
2003-11-02 23:25:26 +01:00
|
|
|
|
2004-03-09 11:59:55 +01:00
|
|
|
mkdir build
|
|
|
|
cd build
|
|
|
|
LDFLAGS=-Wl,-S ../glibc-*/configure --prefix=$out --enable-add-ons --disable-profile
|
2003-11-02 23:25:26 +01:00
|
|
|
|
2004-03-09 11:59:55 +01:00
|
|
|
make
|
|
|
|
make install
|
|
|
|
#make localedata/install-locales
|
|
|
|
strip -S $out/lib/*.a $out/lib/*.so $out/lib/gconv/*.so || true
|
|
|
|
strip -s $out/bin/* $out/sbin/* $out/libexec/* || true
|
2003-11-02 23:25:26 +01:00
|
|
|
|
2004-03-09 11:59:55 +01:00
|
|
|
ln -sf /etc/ld.so.cache $out/etc/ld.so.cache
|
2003-11-02 23:25:26 +01:00
|
|
|
|
2004-03-09 11:59:55 +01:00
|
|
|
(cd $out/include && ln -s $kernelHeaders/include/* .)
|
2003-11-02 23:25:26 +01:00
|
|
|
|
|
|
|
exit 0
|