Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 664402 Details for
Bug 747346
sys-libs/musl: enable SSP on x86 and allow hardened toolchain
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
musl-1.2.1.patch
file_747346.txt (text/plain), 2.22 KB, created by
Ed Wildgoose
on 2020-10-08 16:56:38 UTC
(
hide
)
Description:
musl-1.2.1.patch
Filename:
MIME Type:
Creator:
Ed Wildgoose
Created:
2020-10-08 16:56:38 UTC
Size:
2.22 KB
patch
obsolete
>--- gentoo/sys-libs/musl/musl-1.2.1.ebuild 2020-08-31 14:19:29.510840267 +0100 >+++ tpb/sys-libs/musl/musl-1.2.1.ebuild 2020-10-08 17:31:02.225958464 +0100 >@@ -60,6 +60,11 @@ > fi > } > >+src_prepare() { >+ cp "${FILESDIR}/__stack_chk_fail_local.c" "$T/" >+ default >+} >+ > src_configure() { > tc-getCC ${CTARGET} > just_headers && export CC=true >@@ -86,9 +91,26 @@ > LDFLAGS="${LDFLAGS}" \ > VPATH="${DISTDIR}" > fi >+ >+ # Create a static library for use with GCC fstack-protector calls >+ # On certain architectures gcc emits a locally defined symbol that needs linking into target app >+ $(tc-getCC) ${CFLAGS} -c "${T}"/__stack_chk_fail_local.c -o "${T}"/__stack_chk_fail_local.o >+ $(tc-getAR) r "${T}"/libssp_nonshared.a "${T}"/__stack_chk_fail_local.o > } > > src_install() { >+ # Avoid breakage while swapping symlink and lib >+ if [ -h ${sysroot}/lib/ld-musl-* ]; then >+ local ldso=$(basename ${sysroot}/lib/ld-musl-*) >+ eerror "***********************************************************************************" >+ eerror "Warning: Reach carefully! Breakage possible!" >+ eerror "In order to do the switcheroo and swap libc location, some manual changes are needed:" >+ eerror "Manual upgrade needed. run:" >+ einfo "cp --remove-destination ${sysroot}/usr/lib/libc.so ${sysroot}/lib/${ldso}" >+ eerror "***********************************************************************************" >+ die >+ fi >+ > local target="install" > just_headers && target="install-headers" > emake DESTDIR="${D}" ${target} >@@ -110,7 +132,7 @@ > cp "${FILESDIR}"/ldconfig.in "${T}" || die > sed -e "s|@@ARCH@@|${arch}|" "${T}"/ldconfig.in > "${T}"/ldconfig || die > into / >- dosbin "${T}"/ldconfig >+ dosbin "${T}"/ldconfig > into /usr > dobin "${T}"/getconf > dobin "${T}"/getent >@@ -118,6 +140,18 @@ > echo 'LDPATH="include ld.so.conf.d/*.conf"' > "${T}"/00musl || die > doenvd "${T}"/00musl > fi >+ >+ # Conditionally upgrade /usr/lib/libc.so into a linker script. Useful on x86 >+ write_libc_so >+} >+ >+write_libc_so() { >+ if [ -e "${sysroot}"/lib/ld-musl-i386.so.1 ]; then >+ rm ${D}/usr/lib/libc.so >+ insinto /usr/lib >+ insopts -m644 >+ newins ${FILESDIR}/libc-so-i386.so libc.so >+ fi > } > > pkg_postinst() {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 747346
: 664402 |
664405
|
664408
|
664411
|
664414
|
664459
|
664462
|
687000