Dash:
[t2.git] / package / develop / gcc / m32-default.diff
blob2e96f61bca36b35cf5e92c16be6d593c615c56dd
1 # --- T2-COPYRIGHT-NOTE-BEGIN ---
2 # T2 SDE: package/*/gcc/m32-default.diff
3 # Copyright (C) 2004 - 2021 The T2 SDE Project
4 #
5 # This Copyright note is generated by scripts/Create-CopyPatch,
6 # more information can be found in the files COPYING and README.
7 #
8 # This patch file is dual-licensed. It is available under the license the
9 # patched project is licensed under, as long as it is an OpenSource license
10 # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
11 # of the GNU General Public License version 2 as used by the T2 SDE.
12 # --- T2-COPYRIGHT-NOTE-END ---
14 Default to a 32-bit on some architectures, mostly (still) for performance.
16 - Rene Rebe <rene@exactcode.de>
18 Upstream multi-lib layout changes w/ a 32-bit default on 64-bit bi-arch
19 platforms. This is unintuitive and breaks clang's expectations, too.
21 It turned out to be suprisingly tricky to implement, as genmultilib
22 and the Makefiles expect the "." to use the compiler defaults. Sigh.
24 --- gcc-11.2.0/gcc/Makefile.in.vanilla 2021-12-23 12:57:26.734925284 +0100
25 +++ gcc-11.2.0/gcc/Makefile.in 2021-12-23 12:58:08.671927447 +0100
26 @@ -2179,7 +2179,7 @@
27 "$(if $(MULTILIB_OSDIRNAMES),,$(MULTIARCH_DIRNAME))" \
28 "$(MULTILIB_REUSE)" \
29 "@enable_multilib@" \
30 - > tmp-mlib.h; \
31 + | sed '2s/\./32/; 3s/6[^ ]*/./; 3{h; s,\.,.:../lib64,p; x}' > tmp-mlib.h; \
32 else \
33 $(SHELL) $(srcdir)/genmultilib '' '' '' '' '' '' '' '' \
34 "$(MULTIARCH_DIRNAME)" '' no \
35 --- gcc-11.2.0/config-ml.in.vanilla 2021-12-25 17:12:01.444627905 +0100
36 +++ gcc-11.2.0/config-ml.in 2021-12-25 17:13:42.471633117 +0100
37 @@ -514,6 +514,7 @@
38 else \
39 if [ -d ../$${dir}/$${lib} ]; then \
40 flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \
41 + flags=$${flags:--m32}; \
42 if (cd ../$${dir}/$${lib}; $(MAKE) $(FLAGS_TO_PASS) \
43 CFLAGS="$(CFLAGS) $${flags}" \
44 CCASFLAGS="$(CCASFLAGS) $${flags}" \
45 @@ -752,6 +753,7 @@
46 dir=`echo $i | sed -e 's/;.*$//'`
47 if [ "${dir}" = "${ml_dir}" ]; then
48 flags=`echo $i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`
49 + flags=${flags:--m32}
50 break
52 done
53 --- gcc-4.9.2/gcc/config/sparc/linux64.h.vanilla 2015-02-15 14:56:58.340000000 +0000
54 +++ gcc-4.9.2/gcc/config/sparc/linux64.h 2015-02-15 14:58:34.392000000 +0000
55 @@ -32,12 +32,14 @@
57 /* On Linux, the combination sparc64-* --with-cpu=v8 is supported and
58 selects a 32-bit compiler. */
59 +#if 0
60 #if defined(TARGET_64BIT_DEFAULT) && TARGET_CPU_DEFAULT >= TARGET_CPU_v9
61 #undef TARGET_DEFAULT
62 #define TARGET_DEFAULT \
63 (MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_STACK_BIAS + \
64 MASK_APP_REGS + MASK_FPU + MASK_LONG_DOUBLE_128)
65 #endif
66 +#endif
68 /* This must be v9a not just v9 because by default we enable
69 -mvis. */