core/glibc-32/Pkgfile

57 lines
1.4 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
2020-08-11 11:15:56 +02:00
version=2.32
release=3
source=(http://ftp.gnu.org/gnu/glibc/glibc-$version.tar.xz \
http://www.kernel.org/pub/linux/kernel/v5.x/linux-5.4.72.tar.xz \
glibc-$version-3.patch lib32.conf)
build() {
2020-05-21 17:21:51 +02:00
# install kernel headers
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
patch -p1 -d $SRC/glibc-${version:0:4} -i $SRC/glibc-$version-3.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 \
--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 \
--disable-profile \
--disable-werror \
--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
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
}