Merge pull request #314 from pder/gcc-13-disable-ssp
gcc 13.1.0: don't enable default ssp or pie
This commit is contained in:
commit
fd9e8d547f
|
@ -50,7 +50,7 @@ b3a8d59229289ca5a1de6a24c9c828d2847144f6662e0d5b7f41e7ff6e57abaa flex-2.5.33_0.
|
|||
5ff7fbe16b55563719b108260bd6a34ebabab0465d758ca98cba522932532e45 gawk-3.0.4_0.tar.bz2
|
||||
6de1c1380026ef9948387e665610185b6014f47a80453177a6c81898c95cbbd3 gc-8.0.4_0.tar.bz2
|
||||
374b54f568d7c67eb91f68a95b09322c9f6dc9c55cc6d49803ca3f5a8a3f6dbc gcc-10.4.0_0.tar.bz2
|
||||
19404917ea5f641fcd983b3cca011bec67eb1f46799f972ef53a28b50ec3d8e2 gcc-13.1.0_0.tar.bz2
|
||||
e2af44250ca4a29d505ddd7182db7f9c702d7dedcc0604d6f8ddac3872a0c057 gcc-13.1.0_0.tar.bz2
|
||||
b09580c3972ff4e5f6e624bdc83d5328ce017422e0b92a7c170b51b6f04a47d2 gcc-4.0.4_0.tar.bz2
|
||||
c16e9eaab6ac62df3a2a880f35c8da413be150fa00b66f992e37a1b411f32bcf gcc-4.0.4_1.tar.bz2
|
||||
ed1eadc2b40eb3716801eaeaff0dbbc28c79101cf7880753d150bc8f2a4439c6 gcc-4.7.4_0.tar.bz2
|
||||
|
@ -82,7 +82,7 @@ a724c91a43e282c3d338a977e4eeac3b970df241db7872f9d5cf27984b609814 musl-1.1.24_0.
|
|||
b79e0f8a39ba8880d43aa27551b72915655c62af39125e1f4ac8f8e69e71aaca musl-1.1.24_2.tar.bz2
|
||||
81f79a0faf58e105c5f12d9f538d3ea7578a3b361e633ab8f47324ec23ec9de6 musl-1.2.4_0.tar.bz2
|
||||
6dc5e763b747b66f72692c6820d7f46b7f4cf2e2fe05229a1d01c03919c1c936 musl-1.2.4_1.tar.bz2
|
||||
32add363a06099187a7a13af8fd792c818287837c86b63753a8adbbb265ea87b musl-1.2.4_2.tar.bz2
|
||||
538a65e8a55d476099f403ef4b3d13265022efb34d365124663f320262e04f3a musl-1.2.4_2.tar.bz2
|
||||
97351f0df3d08ffdbe728a4b7fb36f91b1d83396be13ef6005ce62b9b62a9e07 openssl-1.1.1l_0.tar.bz2
|
||||
61eedd6037ed342d069c48cf81792f9bd131ae2e9b937cd5c5e799f62d88c15c patch-2.7.6_0.tar.bz2
|
||||
914a7abf36a64723b6e9f9b0b6ccd19c8e544fa798896a2bb1151dc341890c22 perl-5.000_0.tar.bz2
|
||||
|
|
|
@ -84,8 +84,6 @@ src_configure() {
|
|||
--host=i386-unknown-linux-musl \
|
||||
--enable-bootstrap \
|
||||
--enable-static \
|
||||
--enable-default-pie \
|
||||
--enable-default-ssp \
|
||||
--disable-plugins \
|
||||
--disable-libssp \
|
||||
--disable-libsanitizer \
|
||||
|
|
|
@ -1,35 +0,0 @@
|
|||
SPDX-FileCopyrightText: 2023 fosslinux <fosslinux@aussies.space>
|
||||
SPDX-FileCopyrightText: 2020 Timo Teräs <timo.teras@iki.fi>
|
||||
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
The original motivation from this patch from Alpine Linux:
|
||||
|
||||
Subject: [PATCH] Alpine musl package provides libssp_nonshared.a. We link to
|
||||
it unconditionally, as otherwise we get link failures if some objects are
|
||||
-fstack-protector built and final link happens with -fno-stack-protector.
|
||||
This seems to be the common case when bootstrapping gcc, the piepatches do
|
||||
not seem to fully fix the crosstoolchain and bootstrap sequence wrt.
|
||||
stack-protector flag usage.
|
||||
|
||||
Which matches precisely the problem when compiling GCC with --enable-bootstrap
|
||||
in live-bootstrap.
|
||||
|
||||
---
|
||||
gcc/gcc.cc | 3 +--
|
||||
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||
|
||||
diff --git gcc/gcc.cc gcc/gcc.cc
|
||||
index cc99d0b7aa1..c60a75371f8 100644
|
||||
--- gcc/gcc.cc
|
||||
+++ gcc/gcc.cc
|
||||
@@ -1004,8 +1004,7 @@ proper position among the other output files. */
|
||||
|
||||
#ifndef LINK_SSP_SPEC
|
||||
#ifdef TARGET_LIBC_PROVIDES_SSP
|
||||
-#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
- "|fstack-protector-strong|fstack-protector-explicit:}"
|
||||
+#define LINK_SSP_SPEC "-lssp_nonshared"
|
||||
#else
|
||||
#define LINK_SSP_SPEC "%{fstack-protector|fstack-protector-all" \
|
||||
"|fstack-protector-strong|fstack-protector-explicit" \
|
|
@ -14,19 +14,11 @@ src_configure() {
|
|||
|
||||
src_compile() {
|
||||
make "${MAKEJOBS}" CROSS_COMPILE=
|
||||
|
||||
# Provide libssp_nonshared.a to avoid GCC's messy libssp
|
||||
# (Taken from Alpine Linux)
|
||||
gcc -c __stack_chk_fail_local.c -o __stack_chk_fail_local.o
|
||||
ar r libssp_nonshared.a __stack_chk_fail_local.o
|
||||
}
|
||||
|
||||
src_install() {
|
||||
default
|
||||
|
||||
# Install libssp_nonshared.a
|
||||
install -m 644 libssp_nonshared.a "${DESTDIR}${PREFIX}/lib/"
|
||||
|
||||
# Make dynamic linker symlink relative in ${PREFIX}/lib
|
||||
rm "${DESTDIR}/lib/ld-musl-i386.so.1"
|
||||
rmdir "${DESTDIR}/lib"
|
||||
|
|
Loading…
Reference in New Issue