blob: c93f2f1febc7aa9689d54997782f88f0649d0e23 (
plain)
1 # Description: The C library used in the GNU system
2 # URL: http://www.gnu.org/software/libc/
3 # Maintainer: CRUX System Team, core-ports at crux dot nu
4
5 name=glibc-32
6 version=2.36
7 release=3
8 _kernel_version=5.15.55
9
10 source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz
11 https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_kernel_version.tar.xz
12 glibc-2.35-make-4.4-MAKEFLAGS.patch
13 glibc-$version-3.patch lib32.conf)
14
15 build() {
16 # install kernel headers
17 make -C $SRC/linux-$_kernel_version mrproper
18 make -C $SRC/linux-$_kernel_version headers_check
19 make -C $SRC/linux-$_kernel_version INSTALL_HDR_PATH=$PKG/usr headers_install
20 chown root:root $PKG/usr
21
22 patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-$version-3.patch
23 patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-2.35-make-4.4-MAKEFLAGS.patch
24
25 mkdir $SRC/build
26 cd $SRC/build
27
28 export libc_cv_slibdir=/lib32
29 export CC="${CC:-gcc} -m32"
30 export CFLAGS="$CFLAGS -Wno-error=parentheses"
31
32 ../glibc-${version:0:4}/configure --prefix=/usr \
33 --libdir=/usr/lib32 \
34 --libexecdir=/usr/lib32 \
35 --with-headers=$PKG/usr/include \
36 --enable-kernel=4.9 \
37 --enable-add-ons \
38 --enable-stack-protector=strong \
39 --enable-static-pie \
40 --enable-bind-now \
41 --enable-multi-arch \
42 --disable-profile \
43 --disable-werror \
44 --without-gd \
45 --enable-multi-arch \
46 i686-pc-linux-gnu
47
48 make
49 #make check
50 make install_root=$PKG install
51
52 rm -r $PKG/usr/{bin,sbin,share} $PKG/{etc,sbin} $PKG/var
53
54 mv $PKG/usr/include/gnu/stubs-32.h $SRC
55 rm -r $PKG/usr/include
56 install -D $SRC/stubs-32.h $PKG/usr/include/gnu/stubs-32.h
57
58 install -D $SRC/lib32.conf $PKG/etc/ld.so.conf.d/lib32.conf
59
60 install -d $PKG/lib
61 ln -s /lib32/ld-linux.so.2 $PKG/lib/ld-linux.so.2
62 }
|