summaryrefslogtreecommitdiff
path: root/misc/klibc/klibc.SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'misc/klibc/klibc.SlackBuild')
-rw-r--r--misc/klibc/klibc.SlackBuild16
1 files changed, 9 insertions, 7 deletions
diff --git a/misc/klibc/klibc.SlackBuild b/misc/klibc/klibc.SlackBuild
index 7f2b0f5d74..b92e17c21f 100644
--- a/misc/klibc/klibc.SlackBuild
+++ b/misc/klibc/klibc.SlackBuild
@@ -2,7 +2,7 @@
# Slackware build script for klibc
-# Copyright 2014 Matt Dinslage (daedra1980@gmail.com), Springfield, MO, USA
+# Copyright 2021 Matt Dinslage (daedra1980@gmail.com), Springfield, MO, USA
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
@@ -25,7 +25,7 @@
cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=klibc
-VERSION=${VERSION:-2.0.4}
+VERSION=${VERSION:-2.0.9}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -86,12 +86,14 @@ if [ $ARCH = "x86_64" ]; then
sed -i 's,$(prefix)/lib,$(prefix)/lib64,g' Makefile
fi
-# Patch for building with newer kernels.
-# Thanks to the gentoo team for the patch.
-patch -p1 < $CWD/klibc-2.0.3-kernel-uapi.patch
+mkdir -p uapi/include
+ln -sf /usr/include/{asm,asm-generic,linux} uapi/include/
-env -u ARCH KLIBCKERNELSRC=/lib/modules/$KERNEL/source HOSTCFLAGS="$SLKCFLAGS" make
-env -u ARCH KLIBCKERNELSRC=/lib/modules/$KERNEL/source make install INSTALLROOT=$PKG
+make KLIBCKERNELSRC=uapi
+make KLIBCKERNELSRC=uapi install INSTALLROOT=$PKG
+
+# Don't ship .la files:
+rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la
find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
| cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true