commit: 94616038c4dcdaaf7fc9af0e803dcfd1b8899811
Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
AuthorDate: Sun Feb 28 16:53:37 2016 +0000
Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
CommitDate: Sun Feb 28 16:53:50 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94616038
sys-freebsd/freebsd-lib: add DESTDIR support to gen_libc_ldscript function so
that we can make the ldscript SYSROOT relative when building a cross compiler.
Package-Manager: portage-2.2.27
Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild
b/sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild
index eb75ede..0ce19a2 100644
--- a/sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild
+++ b/sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild
@@ -405,11 +405,11 @@ gen_libc_ldscript() {
# $3 = source libssp_nonshared dir
# Clear the symlink.
- rm -f "${D}/$2/libc.so" || die
+ rm -f "${DESTDIR}/$2/libc.so" || die
# Move the library if needed
if [ "$1" != "$2" ] ; then
- mv "${D}/$2/libc.so.7" "${D}/$1/" || die
+ mv "${DESTDIR}/$2/libc.so.7" "${DESTDIR}/$1/" || die
fi
# Generate libc.so ldscript for inclusion of libssp_nonshared.a when
linking
@@ -423,7 +423,7 @@ gen_libc_ldscript() {
# iconv symbol provided by libc_nonshared.a.
# http://svnweb.freebsd.org/base?view=revision&revision=258283
- cat > "${D}/$2/libc.so" <<-END_LDSCRIPT
+ cat > "${DESTDIR}/$2/libc.so" <<-END_LDSCRIPT
/* GNU ld script
SSP (-fstack-protector) requires __stack_chk_fail_local to be local.
GCC invokes this symbol in a non-PIC way, which results in TEXTRELs if
@@ -528,13 +528,13 @@ do_install() {
if ! is_crosscompile ; then
if ! multilib_is_native_abi ; then
- gen_libc_ldscript "usr/$(get_libdir)"
"usr/$(get_libdir)" "usr/$(get_libdir)"
+ DESTDIR="${D}" gen_libc_ldscript "usr/$(get_libdir)"
"usr/$(get_libdir)" "usr/$(get_libdir)"
else
dodir "$(get_libdir)"
- gen_libc_ldscript "$(get_libdir)" "usr/$(get_libdir)"
"usr/$(get_libdir)"
+ DESTDIR="${D}" gen_libc_ldscript "$(get_libdir)"
"usr/$(get_libdir)" "usr/$(get_libdir)"
fi
else
- CHOST=${CTARGET} gen_libc_ldscript "usr/${CTARGET}/usr/lib"
"usr/${CTARGET}/usr/lib" "usr/${CTARGET}/usr/lib"
+ CHOST=${CTARGET} DESTDIR="${D}/usr/${CTARGET}/"
gen_libc_ldscript "usr/lib" "usr/lib" "usr/lib"
# We're done for the cross libc here.
return 0
fi