libsoup3: update to 3.6.0; fix GTK2/3 app startup
[oi-userland.git] / components / developer / gcc-13 / patches / 0027-G-should-imply-the-same-specs-as-shared.patch
blob3f045c2c9338d7cba858862c71f6b1819640a5c0
1 From a6c5b9d7b48601a8a4e6bde6c4c48880caf0ec78 Mon Sep 17 00:00:00 2001
2 From: Andy Fiddaman <omnios@citrus-it.co.uk>
3 Date: Wed, 19 Feb 2020 21:30:23 +0000
4 Subject: -G should imply the same specs as -shared
6 ---
7 gcc/config/sol2.h | 38 ++++++++++++++++++--------------------
8 1 file changed, 18 insertions(+), 20 deletions(-)
10 diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h
11 index f4cbf3e1eb1c..dd6d25a534a7 100644
12 --- a/gcc/config/sol2.h
13 +++ b/gcc/config/sol2.h
14 @@ -200,7 +200,7 @@ along with GCC; see the file COPYING3. If not see
15 executable programs. */
16 #undef STARTFILE_ARCH_SPEC
17 #define STARTFILE_ARCH_SPEC \
18 - "%{!shared:%{!symbolic: \
19 + "%{!shared:%{!symbolic:%{!G: \
20 %{ \
21 std=c89|std=c90|std=gnu89|std=gnu90:values-Xa.o%s; \
22 ansi|std=c*|std=iso9899\\:199409:values-Xc.o%s; \
23 @@ -208,14 +208,14 @@ along with GCC; see the file COPYING3. If not see
24 %{ \
25 std=c89|std=c90|std=gnu89|std=gnu90:; \
26 :values-xpg6.o%s \
27 - }}}"
28 + }}}}"
30 #if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
31 #define STARTFILE_CRTBEGIN_SPEC "%{static:crtbegin.o%s; \
32 - shared|" PIE_SPEC ":crtbeginS.o%s; \
33 + shared|G|" PIE_SPEC ":crtbeginS.o%s; \
34 :crtbegin.o%s}"
35 #else
36 -#define STARTFILE_CRTBEGIN_SPEC "%{shared:crtbeginS.o%s;:crtbegin.o%s}"
37 +#define STARTFILE_CRTBEGIN_SPEC "%{shared|G:crtbeginS.o%s;:crtbegin.o%s}"
38 #endif
40 #if ENABLE_VTABLE_VERIFY
41 @@ -258,10 +258,10 @@ along with GCC; see the file COPYING3. If not see
42 #endif
44 #define LIBASAN_EARLY_SPEC ASAN_REJECT_SPEC \
45 - " %{!shared:libasan_preinit%O%s} \
46 - %{static-libasan:%{!shared: -Bstatic "\
47 + " %{!shared:%{!G:libasan_preinit%O%s}} \
48 + %{static-libasan:%{!shared:%{!G: -Bstatic "\
49 LD_WHOLE_ARCHIVE_OPTION " -lasan " LD_NO_WHOLE_ARCHIVE_OPTION \
50 - "-Bdynamic}}%{!static-libasan:-lasan}"
51 + "-Bdynamic}}}%{!static-libasan:-lasan}"
53 /* Error out on -fsanitize=thread|leak. */
54 #define LIBTSAN_EARLY_SPEC "\
55 @@ -274,28 +274,28 @@ along with GCC; see the file COPYING3. If not see
56 #ifdef HAVE_SOLARIS_CRTS
57 /* Since Solaris 11.4, the OS delivers crt1.o, crti.o, and crtn.o, with a hook
58 for compiler-dependent stuff like profile handling. */
59 -#define STARTFILE_SPEC "%{!shared:%{!symbolic: \
60 +#define STARTFILE_SPEC "%{!shared:%{!symbolic:%{!G: \
61 crt1.o%s \
62 %{p:%e-p is not supported; \
63 pg:crtpg.o%s gmon.o%s; \
64 - :crtp.o%s}}} \
65 + :crtp.o%s}}}} \
66 crti.o%s %(startfile_arch) %(startfile_crtbegin) \
67 %(startfile_vtv)"
68 #else
69 -#define STARTFILE_SPEC "%{!shared:%{!symbolic: \
70 +#define STARTFILE_SPEC "%{!shared:%{!symbolic:%{!G: \
71 %{p:mcrt1.o%s; \
72 pg:gcrt1.o%s gmon.o%s; \
73 - :crt1.o%s}}} \
74 + :crt1.o%s}}}} \
75 crti.o%s %(startfile_arch) %(startfile_crtbegin) \
76 %(startfile_vtv)"
77 #endif
79 #if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)
80 #define ENDFILE_CRTEND_SPEC "%{static:crtend.o%s; \
81 - shared|" PIE_SPEC ":crtendS.o%s; \
82 + shared|G|" PIE_SPEC ":crtendS.o%s; \
83 :crtend.o%s}"
84 #else
85 -#define ENDFILE_CRTEND_SPEC "%{shared:crtendS.o%s;:crtend.o%s}"
86 +#define ENDFILE_CRTEND_SPEC "%{shared|G:crtendS.o%s;:crtend.o%s}"
87 #endif
89 #undef ENDFILE_SPEC
90 @@ -305,8 +305,7 @@ along with GCC; see the file COPYING3. If not see
92 #undef LINK_ARCH32_SPEC_BASE
93 #define LINK_ARCH32_SPEC_BASE \
94 - "%{G:-G} \
95 - %{YP,*} \
96 + "%{YP,*} \
97 %{R*} \
98 %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp%R/lib:%R/usr/lib} \
99 %{!p:%{!pg:-Y P,%R/lib:%R/usr/lib}}}"
100 @@ -318,8 +317,7 @@ along with GCC; see the file COPYING3. If not see
101 ARCH64_SUBDIR appended to the paths. */
102 #undef LINK_ARCH64_SPEC_BASE
103 #define LINK_ARCH64_SPEC_BASE \
104 - "%{G:-G} \
105 - %{YP,*} \
106 + "%{YP,*} \
107 %{R*} \
108 %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "} \
109 %{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}}}"
110 @@ -402,7 +400,7 @@ along with GCC; see the file COPYING3. If not see
111 #if !defined(USE_GLD) && defined(ENABLE_SHARED_LIBGCC)
112 /* With Sun ld, use mapfile to enforce direct binding to libgcc_s unwinder. */
113 #define LINK_LIBGCC_MAPFILE_SPEC \
114 - "%{shared|shared-libgcc:-M %slibgcc-unwind.map}"
115 + "%{shared|shared-libgcc|G:-M %slibgcc-unwind.map}"
116 #else
117 /* GNU ld doesn't support direct binding. */
118 #define LINK_LIBGCC_MAPFILE_SPEC ""
119 @@ -419,9 +417,9 @@ along with GCC; see the file COPYING3. If not see
120 #undef LINK_SPEC
121 #define LINK_SPEC \
122 "%{h*} %{v:-V} \
123 - %{!shared:%{!static:%{rdynamic: " RDYNAMIC_SPEC "}}} \
124 + %{!shared:%{!static:%{!G:%{rdynamic: " RDYNAMIC_SPEC "}}}} \
125 %{static:-dn -Bstatic} \
126 - %{shared:-G -dy %{!mimpure-text:-z text}} " \
127 + %{shared|G:-G -dy %{!mimpure-text:-z text}} " \
128 LINK_LIBGCC_MAPFILE_SPEC LINK_CLEARCAP_SPEC " \
129 %{symbolic:-Bsymbolic -G -dy -z text} \
130 %(link_arch) \