about summary refs log tree commit diff
path: root/pkgs/development/libraries/glibc/builder.sh
blob: e3842a81c1db75f4ed3524a8055a12bcf17798ae (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#! /bin/sh

# glibc cannot have itself in its rpath.
export NIX_NO_SELF_RPATH=1
. $stdenv/setup

tar xvfj $glibcSrc
(cd glibc-* && tar xvfj $linuxthreadsSrc)

(cd glibc-* && patch -p1 < $vaargsPatch)

mkdir build
cd build
LDFLAGS=-Wl,-S ../glibc-*/configure --prefix=$out --enable-add-ons --disable-profile

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

ln -sf /etc/ld.so.cache $out/etc/ld.so.cache

(cd $out/include && ln -s $kernelHeaders/include/* .)

exit 0