From: Rainer Orth Date: Wed, 19 Nov 2025 08:24:14 +0000 (+0100) Subject: build: Define DISABLE_MULTILIB if --disable-multilib X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a264167c1eddbbdb85b466a5fde190791b1a1ec9;p=thirdparty%2Fgcc.git build: Define DISABLE_MULTILIB if --disable-multilib When building trunk on Solaris with --disable-multilib, I noticed that the non-default multilib wasn't rejected any longer, leading to unexpected link failures. I could trace this to DISABLE_MULTILIB no longer being defined in multilib.h. The problem ist that gcc/genmultilib has been changed in Author: Terry Guo Date: Sun Jan 13 10:12:07 2013 +0000 Makefile.in (s-mlib): New argument MULTILIB_REUSE. This patch factored out the code that sets disable_multilib and controls emission of that macro into a separate generated script (tmpmultilib3), but genmultilib itself continues to check $disable_multilib that isn't ever set there. Fixed by checking enable_multilib instead which is set from the corresponding genmultilib argument. DISABLE_MULTILIB is only referenced in gcc/config/sol2.h, so no other port should be affected. Bootstrapped without regressions on i386-pc-solaris2.11 and sparc-sun-solaris2.11 and verifying that the non-default multilibs are now rejected again as expected. 2025-11-18 Rainer Orth gcc: * genmultilib: Check $enable_multilib to define DISABLE_MULTILIB. --- diff --git a/gcc/genmultilib b/gcc/genmultilib index 756915a6bc4..e4e8941ea2a 100644 --- a/gcc/genmultilib +++ b/gcc/genmultilib @@ -549,7 +549,7 @@ echo "" echo "static const char *multilib_options = \"${moptions}\";" # Finally output the disable flag if specified -if [ "x${disable_multilib}" = xyes ]; then +if [ "x${enable_multilib}" != xyes ]; then echo "" echo "#define DISABLE_MULTILIB 1" fi