summaryrefslogtreecommitdiffstats
path: root/libraries
diff options
context:
space:
mode:
author B. Watson <urchlay@slackware.uk>2025-05-19 05:38:36 -0400
committer Willy Sudiarto Raharjo <willysr@slackbuilds.org>2025-05-24 15:03:57 +0700
commitd7641a10397494e2ee7f107d28534af535b36226 (patch)
treeb335a0edeac0e3f02bbbfe574a06ee75356cd643 /libraries
parentff8f4043d60ddfd7d2a8d6abaee2ff753d943586 (diff)
downloadslackbuilds-d7641a10397494e2ee7f107d28534af535b36226.tar.gz
slackbuilds-d7641a10397494e2ee7f107d28534af535b36226.tar.xz
libraries/dietlibc: Fix 32-bit build.
Signed-off-by: B. Watson <urchlay@slackware.uk> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries')
-rw-r--r--libraries/dietlibc/dietlibc.SlackBuild13
1 files changed, 12 insertions, 1 deletions
diff --git a/libraries/dietlibc/dietlibc.SlackBuild b/libraries/dietlibc/dietlibc.SlackBuild
index 216658fef6..88768d4029 100644
--- a/libraries/dietlibc/dietlibc.SlackBuild
+++ b/libraries/dietlibc/dietlibc.SlackBuild
@@ -23,6 +23,7 @@
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
+# 20250519 bkw: BUILD=2, fix 32-bit build.
# 20250512 bkw: update for v0.35, fix profile.d scripts.
# 20230709 bkw: BUILD=2
# - new maintainer.
@@ -31,7 +32,7 @@ cd $(dirname $0) ; CWD=$(pwd)
PRGNAM=dietlibc
VERSION=${VERSION:-0.35}
-BUILD=${BUILD:-1}
+BUILD=${BUILD:-2}
TAG=${TAG:-_SBo}
PKGTYPE=${PKGTYPE:-tgz}
@@ -67,6 +68,16 @@ chown -R root:root .
find -L . -perm /111 -a \! -perm 755 -a -exec chmod 755 {} + -o \
\! -perm /111 -a \! -perm 644 -a -exec chmod 644 {} +
+# 20250519 bkw: first reason the 32-bit build failed: dietlibc's
+# list of x86 syscalls is missing the one for close_range.
+# Latest CVS from upstream doesn't fix this, but it's simple.
+sed -i '1i#define __NR_close_range 436' i386/syscalls.h
+
+# 20250519 bkw: "json" is a host tool, used by the build, doesn't need
+# to be built with the weird CFLAGS used for the rest of the project.
+# This fixes 32-bit builds (64-bit wasn't broken for some reason).
+make json CC="${CC:-gcc}" CFLAGS="-O2 -fPIC"
+
make
make install DESTDIR=$PKG