core/glibc-32/Pkgfile

60 lines
1.5 KiB
Plaintext
Raw Normal View History

# Description: The C library used in the GNU system
# URL: http://www.gnu.org/software/libc/
# Maintainer: CRUX System Team, core-ports at crux dot nu
name=glibc-32
2022-08-28 10:58:39 +02:00
version=2.36
release=10
2022-08-28 10:58:39 +02:00
_kernel_version=5.15.55
2022-01-07 18:37:13 +01:00
2021-12-11 19:32:26 +01:00
source=(https://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz
2022-01-07 18:37:13 +01:00
https://www.kernel.org/pub/linux/kernel/v5.x/linux-$_kernel_version.tar.xz
glibc-$version-9.patch lib32.conf)
build() {
2020-05-21 17:21:51 +02:00
# install kernel headers
2022-01-07 18:37:13 +01:00
make -C $SRC/linux-$_kernel_version mrproper
make -C $SRC/linux-$_kernel_version INSTALL_HDR_PATH=$PKG/usr headers_install
2020-05-21 17:21:51 +02:00
chown root:root $PKG/usr
patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-$version-9.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 -mstackrealign"
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 \
--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 \
--enable-add-ons \
2018-02-03 02:49:28 +01:00
--enable-stack-protector=strong \
2022-01-07 18:37:13 +01:00
--enable-static-pie \
--enable-bind-now \
2015-06-26 15:27:41 +02:00
--enable-multi-arch \
--disable-profile \
--disable-werror \
--without-gd \
2015-06-26 15:27:41 +02:00
--enable-multi-arch \
i686-pc-linux-gnu
2021-12-11 19:32:26 +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
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
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
}