diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:58:36 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 13:58:36 +0000 |
commit | 1d3b23e6bdbf53eb74161c37d8c355c2ec858a19 (patch) | |
tree | e279a67ec4f447e99b0754e7964666f7b48b5c05 /debian/patches/musl-ssp.diff | |
parent | Adding upstream version 14-20240201. (diff) | |
download | gcc-14-1d3b23e6bdbf53eb74161c37d8c355c2ec858a19.tar.xz gcc-14-1d3b23e6bdbf53eb74161c37d8c355c2ec858a19.zip |
Adding debian version 14-20240201-3.debian/14-20240201-3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/musl-ssp.diff')
-rw-r--r-- | debian/patches/musl-ssp.diff | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/debian/patches/musl-ssp.diff b/debian/patches/musl-ssp.diff new file mode 100644 index 0000000..1cb23bc --- /dev/null +++ b/debian/patches/musl-ssp.diff @@ -0,0 +1,21 @@ +See https://git.alpinelinux.org/aports/commit/?id=d307f133de1f8a9993ab0d6fd51176b9373df4c3 +and https://www.openwall.com/lists/musl/2014/11/05/3 + +--- a/src/gcc/gcc.cc ++++ b/src/gcc/gcc.cc +@@ -1075,8 +1075,15 @@ proper position among the other output f + + #ifndef LINK_SSP_SPEC + #ifdef TARGET_LIBC_PROVIDES_SSP ++#if DEFAULT_LIBC == LIBC_MUSL ++/* When linking without -fstack-protector-something but including objects that ++ were built with -fstack-protector-something, calls to __stack_chk_fail_local ++ can be emitted. Thus -lssp_nonshared must be linked unconditionally. */ ++#define LINK_SSP_SPEC "-lssp_nonshared" ++#else + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit:}" ++#endif + #else + #define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \ + "|fstack-protector-strong|fstack-protector-explicit" \ |