Move libssp into musl out of GCC
The motivations for this are complicated, but on musl systems, musl will use its own libssp implementation, so GCC's libssp is not required. Not to mention that GCC's libssp implementation is questionable at best. This is the approach taken by the two major musl distributions - Alpine Linux and Void Linux.
This commit is contained in:
parent
906b6b8f19
commit
8ae911162a
|
@ -48,7 +48,7 @@ d7b7453ad400eac1ba39f99971afdc392cb8a92c557ef5d6fd9fa2625124de4a ed-1.4_0.tar.b
|
|||
408131b1c033a5f8a6845997b049784be0b466cec107a71270e5a04dae2c1e6c flex-2.6.4_0.tar.bz2
|
||||
5ff7fbe16b55563719b108260bd6a34ebabab0465d758ca98cba522932532e45 gawk-3.0.4_0.tar.bz2
|
||||
6de1c1380026ef9948387e665610185b6014f47a80453177a6c81898c95cbbd3 gc-8.0.4_0.tar.bz2
|
||||
4ed230542823160a4b1a469847cc2cc0ae1985611f2e1b831e13f2a3a7122efb gcc-10.4.0_0.tar.bz2
|
||||
cb1aca35878f7c53e7dc96294ceca2ce3c72cf89359fe2bec46336d5f0849387 gcc-10.4.0_0.tar.bz2
|
||||
b09580c3972ff4e5f6e624bdc83d5328ce017422e0b92a7c170b51b6f04a47d2 gcc-4.0.4_0.tar.bz2
|
||||
58d0d431bb2e96a273965b5e7aa760fb6961a7f7f2fd98ef5fc5a6b7b44bc989 gcc-4.0.4_1.tar.bz2
|
||||
a2301d8dbbfbfcdd18444f01848e8e4366780281009640acbd3af0fab9b11aea gcc-4.7.4_0.tar.bz2
|
||||
|
@ -79,7 +79,7 @@ a724c91a43e282c3d338a977e4eeac3b970df241db7872f9d5cf27984b609814 musl-1.1.24_0.
|
|||
b79e0f8a39ba8880d43aa27551b72915655c62af39125e1f4ac8f8e69e71aaca musl-1.1.24_2.tar.bz2
|
||||
a675ead0f146a96973fca9cc9e4f16081b14c26630ae17405e3ba5e9510ff30d musl-1.2.3_0.tar.bz2
|
||||
054c6a5f1c07d124b701e590267aa8fb2ba1c88bed9a69a473724f8534cdb728 musl-1.2.3_1.tar.bz2
|
||||
3260f0c8bfa1160a2f252c6e0d3ca5f98635ec8f9d9f211a30ef1a0313cac853 musl-1.2.3_2.tar.bz2
|
||||
5ba73e250b0325f690b2c5c3afd4a14cf4612c682e9b358727ebcb7bc6b758ef musl-1.2.3_2.tar.bz2
|
||||
e0c91898e771c65e6a462600243a7858b069db5726680193f86d7dbac3f740ae openssl-1.1.1l_0.tar.bz2
|
||||
69daf6ffbf26fea500426c6936e5a16e82833f03ad0dc6109697f69a8516b4c7 patch-2.7.6_0.tar.bz2
|
||||
914a7abf36a64723b6e9f9b0b6ccd19c8e544fa798896a2bb1151dc341890c22 perl-5.000_0.tar.bz2
|
||||
|
|
|
@ -95,5 +95,6 @@ src_configure() {
|
|||
--disable-sjlj-exceptions \
|
||||
--disable-multilib \
|
||||
--enable-threads=posix \
|
||||
--disable-libsanitizer
|
||||
--disable-libsanitizer \
|
||||
--disable-libssp
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: 2020 Timo Teräs <timo.teras@iki.fi>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||
*/
|
||||
|
||||
extern void __stack_chk_fail(void);
|
||||
void __attribute__((visibility ("hidden"))) __stack_chk_fail_local(void) { __stack_chk_fail(); }
|
|
@ -14,11 +14,19 @@ 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