summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2012-05-17 20:03:01 +0000
committerAlexis Ballier <aballier@gentoo.org>2012-05-17 20:03:01 +0000
commit38f6a050414106819ec708b88a91b56bafb917ae (patch)
tree643df53108e47dfe498d0ac2fd79d2bd29abac93 /sys-freebsd
parentfactorize the src_compile code between the cross and native builds. (diff)
downloadhistorical-38f6a050414106819ec708b88a91b56bafb917ae.tar.gz
historical-38f6a050414106819ec708b88a91b56bafb917ae.tar.bz2
historical-38f6a050414106819ec708b88a91b56bafb917ae.zip
Generate the libc ldscript for the cross-compiled library too.
Package-Manager: portage-2.2.0_alpha107/cvs/Linux x86_64
Diffstat (limited to 'sys-freebsd')
-rw-r--r--sys-freebsd/freebsd-lib/ChangeLog5
-rw-r--r--sys-freebsd/freebsd-lib/Manifest10
-rw-r--r--sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild63
3 files changed, 48 insertions, 30 deletions
diff --git a/sys-freebsd/freebsd-lib/ChangeLog b/sys-freebsd/freebsd-lib/ChangeLog
index a76ebd6916f2..a124cd8b89a0 100644
--- a/sys-freebsd/freebsd-lib/ChangeLog
+++ b/sys-freebsd/freebsd-lib/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-freebsd/freebsd-lib
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.127 2012/05/17 19:21:37 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.128 2012/05/17 20:03:01 aballier Exp $
+
+ 17 May 2012; Alexis Ballier <aballier@gentoo.org> freebsd-lib-9.0-r2.ebuild:
+ Generate the libc ldscript for the cross-compiled library too.
17 May 2012; Alexis Ballier <aballier@gentoo.org> freebsd-lib-9.0-r2.ebuild:
factorize the src_compile code between the cross and native builds.
diff --git a/sys-freebsd/freebsd-lib/Manifest b/sys-freebsd/freebsd-lib/Manifest
index 1d8a8227f099..7669c43cbfbc 100644
--- a/sys-freebsd/freebsd-lib/Manifest
+++ b/sys-freebsd/freebsd-lib/Manifest
@@ -61,13 +61,13 @@ EBUILD freebsd-lib-7.2-r1.ebuild 12021 RMD160 83fc0d2ee7e5ff037ae27358d0b345fc28
EBUILD freebsd-lib-8.0.ebuild 14623 RMD160 3194aa0ab5fda28db1db05b4449d5889251cedc1 SHA1 bbddaa53f36296b2a635c459868cd56fd965de81 SHA256 ba8328339f7c487617d8e1c8754d91ccae38a15073a92b847299aa5e8dfe68da
EBUILD freebsd-lib-8.2-r1.ebuild 15691 RMD160 24faa71ebac5ed9935f52e8e2036cf2e08632ccd SHA1 a17c950b703f3ec5c4bc094d99c1ea12839855f5 SHA256 e5f57f8252c839e5e16dcb1aa29aacaba09c89d2d443a6b159fcad9210834053
EBUILD freebsd-lib-9.0-r1.ebuild 15966 RMD160 6b7ae4425b437ba43df030f8a8b530b796878aa4 SHA1 19505d0f2a215ed6c13f2d457871cd834a103119 SHA256 c86b9b4f42fd1339ea81858fe430d3b34c6ee8a663b14369d7f957769951b7ae
-EBUILD freebsd-lib-9.0-r2.ebuild 13239 RMD160 95151451b7511c1ea3259e642a3f0e8d73144cb5 SHA1 6c3951f0976ea2b84a1b81ed3d342cf52b1a664c SHA256 6968b4b2cfebc4ebf72101286831c1f81a6ebb7668c8e3fe4e1b6708c8bbdedc
-MISC ChangeLog 27180 RMD160 e82aec7f52564f60a6963cabda4810b07e9d262c SHA1 89b6a3f6d7236b610cd29fea7ff57c82ecbf41ed SHA256 99f81686e876d0404c15b9f4199a09cfb3cab47965b192bdb2138a59c88dd18f
+EBUILD freebsd-lib-9.0-r2.ebuild 13579 RMD160 4550844f2daae94039bbc9a509b9856821bf497e SHA1 b49d08fa4955252c29020f46a154fd5fbac2f7d1 SHA256 edceba5d74486513eff259c52ef7a6a00507065c11124a135ce21e64d14e992d
+MISC ChangeLog 27325 RMD160 15bd2ab5c3fadc835f3b85e20ad1af5b8b42343b SHA1 4f20a74a3088ee73ec19945f83304746dd746fee SHA256 aca042980ade6e025c2fb4519c0cf779eaa9d9e2d704e2c42fd4f8f2b8cb50c0
MISC metadata.xml 410 RMD160 f5d6157462d32d3397c8f69ed4d1ff37f2bd5165 SHA1 067425a31e0d87fc9e911ae203cce0fced8da77d SHA256 0ea0a391db3018afdf230e293ffedbc313b4a20db703c8c83fdf144a28c6c246
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.19 (GNU/Linux)
-iEYEARECAAYFAk+1T8YACgkQvFcC4BYPU0ocNgCgyixvFMtkHeXRni5xCgQxykck
-o7kAn08wsIKH2CmUiuO2Xxh1/xhL8L8i
-=gBce
+iEYEARECAAYFAk+1WXoACgkQvFcC4BYPU0oimwCgu3sHvaZdZ4Lf4bJikj2xDTnF
+rmEAoLMQ/XhH32a8HqXVQlSla0CBvx/6
+=c/yL
-----END PGP SIGNATURE-----
diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild
index 998d8673ff22..b2cbd6f623f4 100644
--- a/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild
+++ b/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild,v 1.13 2012/05/17 19:21:37 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild,v 1.14 2012/05/17 20:03:01 aballier Exp $
EAPI=2
@@ -272,6 +272,41 @@ src_compile() {
done
}
+gen_libc_ldscript() {
+ # Parameters:
+ # $1 = target libdir
+ # $2 = source libc dir
+ # $3 = source libssp_nonshared dir
+
+ # Clear the symlink.
+ rm -f "${D}/$2/libc.so" || die
+
+ # Move the library if needed
+ if [ "$1" != "$2" ] ; then
+ mv "${D}/$2/libc.so.7" "${D}/$1/" || die
+ fi
+
+ # Generate libc.so ldscript for inclusion of libssp_nonshared.a when linking
+ # this is done to avoid having to touch gcc spec file as it is currently
+ # done on FreeBSD upstream, mostly because their binutils aren't able to
+ # cope with linker scripts yet.
+ # Taken from toolchain-funcs.eclass:
+ local output_format
+ output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
+ [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
+
+ cat > "${D}/$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
+ this symbol was provided by a shared libc. So we link in
+ libssp_nonshared.a from here.
+ */
+${output_format}
+GROUP ( /$1/libc.so.7 /$3/libssp_nonshared.a )
+END_LDSCRIPT
+}
+
src_install() {
[ "${CTARGET}" = "${CHOST}" ] \
&& INCLUDEDIR="/usr/include" \
@@ -306,7 +341,9 @@ src_install() {
if [ "${CTARGET}" != "${CHOST}" ] ; then
# This is to get it stripped with the correct tools, otherwise it gets
# stripped with the host strip.
+ # And also get the correct OUTPUT_FORMAT in the libc ldscript.
export CHOST=${CTARGET}
+ gen_libc_ldscript "usr/${CTARGET}/usr/lib" "usr/${CTARGET}/usr/lib" "usr/${CTARGET}/usr/lib"
return 0
fi
@@ -322,29 +359,7 @@ src_install() {
gen_usr_ldscript -a alias cam geom ipsec jail kiconv \
kvm m md procstat sbuf thr ufs util
- # Generate libc.so ldscript for inclusion of libssp_nonshared.a when linking
- # this is done to avoid having to touch gcc spec file as it is currently
- # done on FreeBSD upstream, mostly because their binutils aren't able to
- # cope with linker scripts yet.
- # Taken from toolchain-funcs.eclass:
- local output_format
- output_format=$($(tc-getCC) ${CFLAGS} ${LDFLAGS} -Wl,--verbose 2>&1 | sed -n 's/^OUTPUT_FORMAT("\([^"]*\)",.*/\1/p')
- [[ -n ${output_format} ]] && output_format="OUTPUT_FORMAT ( ${output_format} )"
- # Clear the symlink.
- rm -f "${D}/usr/${mylibdir}/libc.so"
- # Move the library
- mv "${D}"/usr/${mylibdir}/libc.so.* "${D}/${mylibdir}/" || die
-
- cat > "${D}/usr/${mylibdir}/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
- this symbol was provided by a shared libc. So we link in
- libssp_nonshared.a from here.
- */
-${output_format}
-GROUP ( /${mylibdir}/libc.so.7 /usr/${mylibdir}/libssp_nonshared.a )
-END_LDSCRIPT
+ gen_libc_ldscript "${mylibdir}" "usr/${mylibdir}" "usr/${mylibdir}"
# Install a libusb.pc for better compat with Linux's libusb
if use usb ; then