summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2012-05-17 19:04:25 +0000
committerAlexis Ballier <aballier@gentoo.org>2012-05-17 19:04:25 +0000
commitb86f9e7c9076264b2af36fa58248a5fa01a84a18 (patch)
treef7d5972f02f64791c143b58bf7f13f3605d60835 /sys-freebsd
parentStable on alpha, bug #415977 (diff)
downloadgentoo-2-b86f9e7c9076264b2af36fa58248a5fa01a84a18.tar.gz
gentoo-2-b86f9e7c9076264b2af36fa58248a5fa01a84a18.tar.bz2
gentoo-2-b86f9e7c9076264b2af36fa58248a5fa01a84a18.zip
factorize the libssp_nonshared bootstrapping code
(Portage version: 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/freebsd-lib-9.0-r2.ebuild25
2 files changed, 17 insertions, 13 deletions
diff --git a/sys-freebsd/freebsd-lib/ChangeLog b/sys-freebsd/freebsd-lib/ChangeLog
index 0fec75aa85bd..d33ce1acd241 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.125 2012/05/17 18:46:14 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.126 2012/05/17 19:04:25 aballier Exp $
+
+ 17 May 2012; Alexis Ballier <aballier@gentoo.org> freebsd-lib-9.0-r2.ebuild:
+ factorize the libssp_nonshared bootstrapping code
17 May 2012; Alexis Ballier <aballier@gentoo.org> freebsd-lib-9.0-r2.ebuild:
use freebsd_src_install rather than mkinstall
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 cdd0102d604b..132acdcb620e 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.11 2012/05/17 18:46:14 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild,v 1.12 2012/05/17 19:04:25 aballier Exp $
EAPI=2
@@ -214,6 +214,13 @@ bootstrap_csu() {
append-ldflags "-B ${WORKDIR}/${csudir}"
}
+# Compile libssp_nonshared.a and add it's path to LDFLAGS.
+bootstrap_libssp_nonshared() {
+ cd "${WORKDIR}/gnu/lib/libssp/libssp_nonshared/" || die "missing libssp."
+ NOFLAGSTRIP=yes freebsd_src_compile
+ append-ldflags "-L${WORKDIR}/gnu/lib/libssp/libssp_nonshared/"
+}
+
src_compile() {
# Does not work with GNU sed
# Force BSD's sed on BSD.
@@ -240,10 +247,7 @@ src_compile() {
append-flags "-isystem /usr/${CTARGET}/usr/include"
- # First compile libssp_nonshared.a and add it's path to LDFLAGS.
- cd "${WORKDIR}/gnu/lib/libssp/libssp_nonshared/" || die "missing libssp."
- $(freebsd_get_bmake) ${mymakeopts} || die "make libssp failed"
- append-ldflags "-L${WORKDIR}/gnu/lib/libssp/libssp_nonshared/"
+ bootstrap_libssp_nonshared
export RAW_LDFLAGS=$(raw-ldflags)
cd "${S}/libc"
@@ -261,17 +265,14 @@ src_compile() {
# the system
append-flags "-isystem '${WORKDIR}/include_proper'"
- # First compile libssp_nonshared.a and add it's path to LDFLAGS.
- einfo "Compiling libssp in \"${WORKDIR}/gnu/lib/libssp/\"."
- cd "${WORKDIR}/gnu/lib/libssp/" || die "missing libssp."
- NOFLAGSTRIP=yes freebsd_src_compile
- # Hack libssp_nonshared.a into libc & others since we don't have
- # the linker script in place yet.
- append-ldflags "-L${WORKDIR}/gnu/lib/libssp/libssp_nonshared/"
+ bootstrap_libssp_nonshared
+
einfo "Compiling libc."
cd "${S}"
export RAW_LDFLAGS=$(raw-ldflags)
NOFLAGSTRIP=yes LDADD="-lssp_nonshared" freebsd_src_compile
+ cd "${WORKDIR}/gnu/lib/libssp/" || die "missing libssp."
+ NOFLAGSTRIP=yes LDADD="-lssp_nonshared" freebsd_src_compile
cd "${WORKDIR}/gnu/lib/libregex" || die
NOFLAGSTRIP=yes LDADD="-lssp_nonshared" freebsd_src_compile
fi