# --- T2-COPYRIGHT-NOTE-BEGIN --- # T2 SDE: package/*/gcc/m32-default.diff # Copyright (C) 2004 - 2022 The T2 SDE Project # # This Copyright note is generated by scripts/Create-CopyPatch, # more information can be found in the files COPYING and README. # # This patch file is dual-licensed. It is available under the license the # patched project is licensed under, as long as it is an OpenSource license # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms # of the GNU General Public License version 2 as used by the T2 SDE. # --- T2-COPYRIGHT-NOTE-END --- Default to a 32-bit on some architectures, mostly (still) for performance. - Rene Rebe Upstream multi-lib layout changes w/ a 32-bit default on 64-bit bi-arch platforms. This is unintuitive and breaks clang's expectations, too. It turned out to be suprisingly tricky to implement, as genmultilib and the Makefiles expect the "." to use the compiler defaults. Sigh. --- gcc-11.2.0/gcc/Makefile.in.vanilla 2021-12-23 12:57:26.734925284 +0100 +++ gcc-11.2.0/gcc/Makefile.in 2021-12-23 12:58:08.671927447 +0100 @@ -2179,7 +2179,7 @@ "$(if $(MULTILIB_OSDIRNAMES),,$(MULTIARCH_DIRNAME))" \ "$(MULTILIB_REUSE)" \ "@enable_multilib@" \ - > tmp-mlib.h; \ + | sed '2s/\./32/; 3s/6[^ ]*/./; 3{h; s,\.,.:../lib64,p; x}' > tmp-mlib.h; \ else \ $(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' '' '' \ "$(MULTIARCH_DIRNAME)" '' no \ --- gcc-11.2.0/config-ml.in.vanilla 2021-12-25 17:12:01.444627905 +0100 +++ gcc-11.2.0/config-ml.in 2021-12-25 17:13:42.471633117 +0100 @@ -514,6 +514,7 @@ else \ if [ -d ../$${dir}/$${lib} ]; then \ flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ + flags=$${flags:--m32}; \ if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \ CFLAGS="$(CFLAGS) $${flags}" \ CCASFLAGS="$(CCASFLAGS) $${flags}" \ @@ -752,6 +753,7 @@ dir=`echo $i | sed -e 's/;.*$//'` if [ "${dir}" = "${ml_dir}" ]; then flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'` + flags=${flags:--m32} break fi done --- gcc-12.1.0/gcc/config/sparc/linux64.h.vanilla 2022-08-11 15:09:22.339383551 +0200 +++ gcc-12.1.0/gcc/config/sparc/linux64.h 2022-08-11 15:09:39.258382877 +0200 @@ -32,12 +32,14 @@ /* On Linux, the combination sparc64-* --with-cpu=v8 is supported and selects a 32-bit compiler. */ +#if 0 #if defined(TARGET_64BIT_DEFAULT) && TARGET_CPU_DEFAULT >= TARGET_CPU_v9 #undef TARGET_DEFAULT #define TARGET_DEFAULT \ (MASK_V9 + MASK_64BIT + MASK_PTR64 + MASK_STACK_BIAS + \ MASK_V8PLUS + MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128) #endif +#endif /* This must be v9a not just v9 because by default we enable -mvis. */