Gentoo Archives: gentoo-commits

From: Alexis Ballier <aballier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sys-freebsd/freebsd-lib/
Date: Sun, 28 Feb 2016 16:54:07
Message-Id: 1456678430.94616038c4dcdaaf7fc9af0e803dcfd1b8899811.aballier@gentoo
1 commit: 94616038c4dcdaaf7fc9af0e803dcfd1b8899811
2 Author: Alexis Ballier <aballier <AT> gentoo <DOT> org>
3 AuthorDate: Sun Feb 28 16:53:37 2016 +0000
4 Commit: Alexis Ballier <aballier <AT> gentoo <DOT> org>
5 CommitDate: Sun Feb 28 16:53:50 2016 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=94616038
7
8 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.
9
10 Package-Manager: portage-2.2.27
11 Signed-off-by: Alexis Ballier <aballier <AT> gentoo.org>
12
13 sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild | 12 ++++++------
14 1 file changed, 6 insertions(+), 6 deletions(-)
15
16 diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild
17 index eb75ede..0ce19a2 100644
18 --- a/sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild
19 +++ b/sys-freebsd/freebsd-lib/freebsd-lib-10.2-r2.ebuild
20 @@ -405,11 +405,11 @@ gen_libc_ldscript() {
21 # $3 = source libssp_nonshared dir
22
23 # Clear the symlink.
24 - rm -f "${D}/$2/libc.so" || die
25 + rm -f "${DESTDIR}/$2/libc.so" || die
26
27 # Move the library if needed
28 if [ "$1" != "$2" ] ; then
29 - mv "${D}/$2/libc.so.7" "${D}/$1/" || die
30 + mv "${DESTDIR}/$2/libc.so.7" "${DESTDIR}/$1/" || die
31 fi
32
33 # Generate libc.so ldscript for inclusion of libssp_nonshared.a when linking
34 @@ -423,7 +423,7 @@ gen_libc_ldscript() {
35
36 # iconv symbol provided by libc_nonshared.a.
37 # http://svnweb.freebsd.org/base?view=revision&amp;revision=258283
38 - cat > "${D}/$2/libc.so" <<-END_LDSCRIPT
39 + cat > "${DESTDIR}/$2/libc.so" <<-END_LDSCRIPT
40 /* GNU ld script
41 SSP (-fstack-protector) requires __stack_chk_fail_local to be local.
42 GCC invokes this symbol in a non-PIC way, which results in TEXTRELs if
43 @@ -528,13 +528,13 @@ do_install() {
44
45 if ! is_crosscompile ; then
46 if ! multilib_is_native_abi ; then
47 - gen_libc_ldscript "usr/$(get_libdir)" "usr/$(get_libdir)" "usr/$(get_libdir)"
48 + DESTDIR="${D}" gen_libc_ldscript "usr/$(get_libdir)" "usr/$(get_libdir)" "usr/$(get_libdir)"
49 else
50 dodir "$(get_libdir)"
51 - gen_libc_ldscript "$(get_libdir)" "usr/$(get_libdir)" "usr/$(get_libdir)"
52 + DESTDIR="${D}" gen_libc_ldscript "$(get_libdir)" "usr/$(get_libdir)" "usr/$(get_libdir)"
53 fi
54 else
55 - CHOST=${CTARGET} gen_libc_ldscript "usr/${CTARGET}/usr/lib" "usr/${CTARGET}/usr/lib" "usr/${CTARGET}/usr/lib"
56 + CHOST=${CTARGET} DESTDIR="${D}/usr/${CTARGET}/" gen_libc_ldscript "usr/lib" "usr/lib" "usr/lib"
57 # We're done for the cross libc here.
58 return 0
59 fi