[Bug other/121998] New: --disable-multilib doesn't work if provision for multilib has been made.
mark.dunn.and.sharon.king at gmail dot com
gcc-bugzilla@gcc.gnu.org
Fri Sep 19 10:50:48 GMT 2025
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121998
Bug ID: 121998
Summary: --disable-multilib doesn't work if provision for
multilib has been made.
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: other
Assignee: unassigned at gcc dot gnu.org
Reporter: mark.dunn.and.sharon.king at gmail dot com
Target Milestone: ---
I am using a raspberry PI5 (aarch64-linux-gnu). It uses a Debian based OS
(multiarch not multilib). For embedded work I require simplicity and therefor a
single architecture. \lib32 and \lib64 create a level of complexity I do not
want.
The commands I used were:
export CFLAGS="--sysroot=$UNSTABLE_ISOLATED_SYSROOT"
export LDFLAGS=" \
--sysroot=$UNSTABLE_ISOLATED_SYSROOT \
-Wl,--dynamic-linker=$UNSTABLE_ISOLATED_PREFIX/lib/ld-linux-aarch64.so.1"
export CXXFLAGS=$CFLAGS
mkdir -p $UNSTABLE_ISOLATED_BUILD/gcc
cd $UNSTABLE_ISOLATED_BUILD/gcc
$SOURCE/gcc/configure \
--build=$PI_TRIPLET \
--host=$PI_TRIPLET \
--disable-libquadmath \
--disable-nls \
--disable-multilib \
--enable-bootstrap \
--enable-languages=c,c++ \
--prefix=$UNSTABLE_ISOLATED_PREFIX \
--with-cpu=cortex-a76+crypto \
--with-glibc-version=2.42 \
--with-multiarch-dir=$PI_TRIPLET \
--with-sysroot=$UNSTABLE_ISOLATED_SYSROOT \
--with-tune=cortex-a76
make -j$(nproc)
make install
If MULTILIB_OSDIRNAMES has been set then multilib cannot be disabled.
I fixed it in gcc/Makefile.in but recognise that gcc/Makfile.in is created from
further up the chain. I lack the understanding as to what fixes that to fix
this:
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 4503dab6037..742a4ea1761 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -2498,8 +2498,7 @@ libgcc.mvars: config.status Makefile specs xgcc$(exeext)
# switches.
multilib.h: s-mlib; @true
s-mlib: $(srcdir)/genmultilib Makefile
- if test @enable_multilib@ = yes \
- || test -n "$(MULTILIB_OSDIRNAMES)"; then \
+ if test @enable_multilib@ = yes; then \
$(SHELL) $(srcdir)/genmultilib \
"$(MULTILIB_OPTIONS)" \
"$(MULTILIB_DIRNAMES)" \
@@ -2513,7 +2512,7 @@ s-mlib: $(srcdir)/genmultilib Makefile
"$(MULTILIB_REUSE)" \
"@enable_multilib@" \
> tmp-mlib.h; \
- else \
+ elif test -n "$(MULTILIB_OSDIRNAMES)"; then \
$(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' '' '' \
"$(MULTIARCH_DIRNAME)" '' no \
> tmp-mlib.h; \
More information about the Gcc-bugs
mailing list