2012-11-22 19:38:39 +01:00
|
|
|
# Description: The C library used in the GNU system
|
2021-03-24 15:19:36 +01:00
|
|
|
# URL: http://www.gnu.org/software/libc/
|
|
|
|
# Maintainer: CRUX System Team, core-ports at crux dot nu
|
2012-11-22 19:38:39 +01:00
|
|
|
|
|
|
|
name=glibc-32
|
2020-08-11 11:15:56 +02:00
|
|
|
version=2.32
|
2022-02-12 14:58:43 +01:00
|
|
|
release=7
|
2021-09-18 15:32:19 +02:00
|
|
|
source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
|
|
|
|
https://www.kernel.org/pub/linux/kernel/v5.x/linux-5.4.72.tar.xz \
|
2022-02-12 14:58:43 +01:00
|
|
|
glibc-$version-7.patch lib32.conf)
|
2012-11-22 19:38:39 +01:00
|
|
|
|
|
|
|
build() {
|
2020-05-21 17:21:51 +02:00
|
|
|
# install kernel headers
|
2020-10-19 17:32:06 +02:00
|
|
|
cd linux-5.4.72
|
2020-05-21 17:21:51 +02:00
|
|
|
make mrproper
|
|
|
|
make headers_check
|
|
|
|
make INSTALL_HDR_PATH=$PKG/usr headers_install
|
|
|
|
chown root:root $PKG/usr
|
|
|
|
|
2022-02-12 14:58:43 +01:00
|
|
|
patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-$version-7.patch
|
2018-07-17 19:17:37 +02:00
|
|
|
|
|
|
|
mkdir $SRC/build
|
|
|
|
cd $SRC/build
|
2015-06-26 15:27:41 +02:00
|
|
|
|
|
|
|
export libc_cv_slibdir=/lib32
|
|
|
|
export CC="${CC:-gcc} -m32"
|
2016-07-01 20:09:00 +02:00
|
|
|
export CFLAGS="$CFLAGS -Wno-error=parentheses"
|
2015-06-26 15:27:41 +02:00
|
|
|
|
2016-07-05 20:41:15 +02:00
|
|
|
../glibc-${version:0:4}/configure --prefix=/usr \
|
2012-11-22 19:38:39 +01:00
|
|
|
--libdir=/usr/lib32 \
|
|
|
|
--libexecdir=/usr/lib32 \
|
2018-07-17 19:17:37 +02:00
|
|
|
--with-headers=$PKG/usr/include \
|
2018-10-23 17:54:25 +02:00
|
|
|
--enable-kernel=4.9 \
|
2012-11-22 19:38:39 +01:00
|
|
|
--enable-add-ons \
|
|
|
|
--disable-profile \
|
2018-01-05 23:19:25 +01:00
|
|
|
--disable-werror \
|
2012-11-22 19:38:39 +01:00
|
|
|
--without-gd \
|
2018-02-03 02:49:28 +01:00
|
|
|
--enable-stack-protector=strong \
|
2015-06-26 15:27:41 +02:00
|
|
|
--enable-multi-arch \
|
|
|
|
i686-pc-linux-gnu
|
|
|
|
|
2012-11-22 19:38:39 +01:00
|
|
|
make
|
|
|
|
#make check
|
|
|
|
make install_root=$PKG install
|
|
|
|
|
2015-07-27 19:50:38 +02:00
|
|
|
rm -r $PKG/usr/{bin,sbin,share} $PKG/{etc,sbin} $PKG/var
|
2012-11-22 19:38:39 +01:00
|
|
|
|
2015-07-27 19:50:38 +02:00
|
|
|
mv $PKG/usr/include/gnu/stubs-32.h $SRC
|
|
|
|
rm -r $PKG/usr/include
|
|
|
|
install -D $SRC/stubs-32.h $PKG/usr/include/gnu/stubs-32.h
|
2012-11-22 19:38:39 +01:00
|
|
|
|
|
|
|
install -D $SRC/lib32.conf $PKG/etc/ld.so.conf.d/lib32.conf
|
2015-07-27 19:50:38 +02:00
|
|
|
|
|
|
|
install -d $PKG/lib
|
|
|
|
ln -s /lib32/ld-linux.so.2 $PKG/lib/ld-linux.so.2
|
2012-11-22 19:38:39 +01:00
|
|
|
}
|