mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-13 06:45:24 +01:00
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
4 changed files with 20 additions and 3 deletions
|
|
@ -95,5 +95,6 @@ src_configure() {
|
|||
--disable-sjlj-exceptions \
|
||||
--disable-multilib \
|
||||
--enable-threads=posix \
|
||||
--disable-libsanitizer
|
||||
--disable-libsanitizer \
|
||||
--disable-libssp
|
||||
}
|
||||
|
|
|
|||
8
sysc/musl-1.2.3/files/__stack_chk_fail_local.c
Normal file
8
sysc/musl-1.2.3/files/__stack_chk_fail_local.c
Normal file
|
|
@ -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…
Add table
Add a link
Reference in a new issue