summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2016-02-28 17:53:37 +0100
committerAlexis Ballier <aballier@gentoo.org>2016-02-28 17:53:50 +0100
commit94616038c4dcdaaf7fc9af0e803dcfd1b8899811 (patch)
treefd584488dbcd135fdf98c0964d4947ea034d25d9 /sys-freebsd/freebsd-lib
parentmedia-libs/gst-plugins-bad: Drop old (diff)
downloadgentoo-94616038c4dcdaaf7fc9af0e803dcfd1b8899811.tar.gz
gentoo-94616038c4dcdaaf7fc9af0e803dcfd1b8899811.tar.bz2
gentoo-94616038c4dcdaaf7fc9af0e803dcfd1b8899811.zip
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@gentoo.org>
Diffstat (limited to 'sys-freebsd/freebsd-lib')
-rw-r--r--sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild12
1 files 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 eb75edec439a..0ce19a22cc0e 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&amp;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