Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/gcc-patches:master commit in: 12.2.0/musl/
Date: Sun, 29 Jan 2023 08:50:34
Message-Id: 1674982226.6cbc18ad615fd39e765d114db4ed13d801e79f14.sam@gentoo
1 commit: 6cbc18ad615fd39e765d114db4ed13d801e79f14
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sun Jan 29 08:22:41 2023 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Jan 29 08:50:26 2023 +0000
6 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6cbc18ad
7
8 12.2.0: shift libssp patch out of nocross
9
10 Bug: https://bugs.gentoo.org/862831
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 12.2.0/musl/50_all_libssp_unconditionally.patch | 24 ++++++++++++++++++++++++
14 12.2.0/musl/README.history | 3 +++
15 2 files changed, 27 insertions(+)
16
17 diff --git a/12.2.0/musl/50_all_libssp_unconditionally.patch b/12.2.0/musl/50_all_libssp_unconditionally.patch
18 new file mode 100644
19 index 0000000..a3b5984
20 --- /dev/null
21 +++ b/12.2.0/musl/50_all_libssp_unconditionally.patch
22 @@ -0,0 +1,24 @@
23 +https://bugs.gentoo.org/706210
24 +https://bugs.gentoo.org/747346
25 +
26 +Author: Timo Teräs <timo.teras@×××.fi>
27 +
28 +"Alpine musl package provides libssp_nonshared.a. We link to it unconditionally,
29 +as otherwise we get link failures if some objects are -fstack-protector built
30 +and final link happens with -fno-stack-protector. This seems to be the common
31 +case when bootstrapping gcc, the piepatches do not seem to fully fix the
32 +crosstoolchain and bootstrap sequence wrt. stack-protector flag usage."
33 +
34 +(We do the same in Gentoo.)
35 +--- a/gcc/gcc.cc
36 ++++ b/gcc/gcc.cc
37 +@@ -870,8 +870,7 @@
38 +
39 + #ifndef LINK_SSP_SPEC
40 + #ifdef TARGET_LIBC_PROVIDES_SSP
41 +-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
42 +- "|fstack-protector-strong|fstack-protector-explicit:}"
43 ++#define LINK_SSP_SPEC "-lssp_nonshared"
44 + #else
45 + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
46 + "|fstack-protector-strong|fstack-protector-explicit" \
47
48 diff --git a/12.2.0/musl/README.history b/12.2.0/musl/README.history
49 index 0999249..56093c5 100644
50 --- a/12.2.0/musl/README.history
51 +++ b/12.2.0/musl/README.history
52 @@ -1,3 +1,6 @@
53 +7 29 Jan 2022
54 + U 50_all_libssp_unconditionally.patch
55 +
56 6 03 Jul 2022
57 - 50_all_calloc_libgccjit.patch