Skip to content

Commit 4de0dea

Browse files
[all] Test patch
1 parent c087c57 commit 4de0dea

2 files changed

Lines changed: 46 additions & 1 deletion

File tree

build-dev-tarball.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ git clone --depth 2 -b "$branch" https://git.savannah.gnu.org/git/"$package".git
4141
git clone --depth 1 https://git.savannah.gnu.org/git/gnulib.git
4242

4343
# Apply patches.
44-
(cd "$package" && patch -p1 < ../patches/Skip-test-option-parser.sh-for-ksh-shell-on-NetBSD.patch)
44+
(cd "$package" && patch -p1 < ../patches/Skip-test-option-parser.sh-for-ksh-shell-on-NetBSD.patch \
45+
&& patch -p1 < ../patches/0001-libtool-Limit-a-length-of-DLL-name-to-8.3-correctly.patch)
4546

4647
export GNULIB_SRCDIR=`pwd`/gnulib
4748
cd "$package"
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
From db097f65fe44662f456f3cc54bbc6bfd132c9e4d Mon Sep 17 00:00:00 2001
2+
From: KO Myung-Hun <komh@chollian.net>
3+
Date: Thu, 13 Nov 2025 14:41:48 +0900
4+
Subject: [PATCH] libtool: Limit a length of DLL name to 8.3 correctly
5+
6+
If a length of $release and/or $versionsuffix is more than 8 bytes,
7+
a length of DLL name may be more than 8.
8+
9+
Then, this corrupts a generated DLL on OS/2.
10+
11+
This patch assures 3 bytes for libname, 2 bytes for release, and 3 bytes
12+
for version at least.
13+
14+
* m4/libtool.m4 (soname_spec) [os2*]: Limit a length of DLL name to 8.3
15+
correctly.
16+
---
17+
m4/libtool.m4 | 11 ++++++++---
18+
1 file changed, 8 insertions(+), 3 deletions(-)
19+
20+
diff --git a/m4/libtool.m4 b/m4/libtool.m4
21+
index 6c3029f8..495bd10b 100644
22+
--- a/m4/libtool.m4
23+
+++ b/m4/libtool.m4
24+
@@ -3173,9 +3173,14 @@ os2*)
25+
need_lib_prefix=no
26+
# OS/2 can only load a DLL with a base name of 8 characters or less.
27+
soname_spec='`test -n "$os2dllname" && libname="$os2dllname";
28+
- v=$($ECHO $release$versuffix | tr -d .-);
29+
- n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _);
30+
- $ECHO $n$v`$shared_ext'
31+
+ n=$($ECHO $libname | tr -d .-);
32+
+ l=${#n}; test 3 -lt "$l" && l=3; mr=$((8 - $l));
33+
+ r=$($ECHO $release | tr -d .-);
34+
+ l=${#r}; test 2 -lt "$l" && l=2; mv=$(($mr - $l));
35+
+ v=$($ECHO $versuffix | tr -d .- | cut -b -$mv);
36+
+ r=$($ECHO $r | cut -b -$(($mr - ${#v})));
37+
+ n=$($ECHO $n | cut -b -$((8 - ${#r} - ${#v})));
38+
+ $ECHO $n$r$v`$shared_ext'
39+
library_names_spec='${libname}_dll.$libext'
40+
dynamic_linker='OS/2 ld.exe'
41+
shlibpath_var=BEGINLIBPATH
42+
--
43+
2.50.1
44+

0 commit comments

Comments
 (0)