aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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