Skip to content

Commit 423a08a

Browse files
Merge pull request #72 from appdevforall/fix/ADFA-4467-build-static-autoreconf
fix(build-static): restore autoreconf -fi in tar/less pre_configure overrides
2 parents ba9cad1 + 67294e9 commit 423a08a

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎tools/proot-builder/build_static.sh‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,15 @@ termux_step_pre_configure() {
200200
CFLAGS+=" -Wno-error=implicit-function-declaration -Dlchmod=chmod"
201201
export gl_cv_func_lchown_works=yes
202202
TERMUX_PKG_EXTRA_CONFIGURE_ARGS+=" --disable-year2038"
203+
204+
# fix-linking-to-iconv.patch edits src/Makefile.am, so Makefile.in must be
205+
# regenerated. Upstream's tar/build.sh does this in its own pre_configure; this
206+
# override REPLACES that function (Bash: last definition wins), so redo it here
207+
# as the LAST statement. Without it, make falls back to maintainer-mode
208+
# 'automake-1.16', absent in the ubuntu:26.04 builder image (Automake 1.17).
209+
# Safe for static binaries: -static flags above are applied later by
210+
# ./configure; autoreconf only regenerates the build system.
211+
autoreconf -fi
203212
}
204213
EOF
205214

@@ -278,6 +287,11 @@ termux_step_pre_configure() {
278287
mv $TERMUX_PREFIX/lib/libtinfo*.so* $TERMUX_PREFIX/lib/hidden_so/ 2>/dev/null || true
279288
280289
LDFLAGS+=" -static -ffunction-sections -fdata-sections -Wl,--gc-sections"
290+
291+
# Upstream less/build.sh regenerates the build system here; this override
292+
# replaces that function, so redo it (last statement). Same automake-1.16 vs
293+
# ubuntu:26.04 reasoning as tar. Does not affect static linking.
294+
autoreconf -fi
281295
}
282296
termux_step_post_make() {
283297
mv $TERMUX_PREFIX/lib/hidden_so/* $TERMUX_PREFIX/lib/ 2>/dev/null || true

0 commit comments

Comments
 (0)