summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Ballier <aballier@gentoo.org>2012-05-18 17:38:01 +0000
committerAlexis Ballier <aballier@gentoo.org>2012-05-18 17:38:01 +0000
commitd60d5aca13868bfa85d5d1208857b9d6c4d27051 (patch)
tree06e5d397dadaca24b1756de79ada1bc86a6254dd /sys-freebsd/freebsd-lib
parentremove old (diff)
downloadgentoo-2-d60d5aca13868bfa85d5d1208857b9d6c4d27051.tar.gz
gentoo-2-d60d5aca13868bfa85d5d1208857b9d6c4d27051.tar.bz2
gentoo-2-d60d5aca13868bfa85d5d1208857b9d6c4d27051.zip
factorize the bootstrapping code between cross and native builds.
(Portage version: 2.2.0_alpha107/cvs/Linux x86_64)
Diffstat (limited to 'sys-freebsd/freebsd-lib')
-rw-r--r--sys-freebsd/freebsd-lib/ChangeLog5
-rw-r--r--sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild25
2 files changed, 19 insertions, 11 deletions
diff --git a/sys-freebsd/freebsd-lib/ChangeLog b/sys-freebsd/freebsd-lib/ChangeLog
index 93138e42f6d2..cbca948338cb 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.134 2012/05/18 16:37:26 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/ChangeLog,v 1.135 2012/05/18 17:38:01 aballier Exp $
+
+ 18 May 2012; Alexis Ballier <aballier@gentoo.org> freebsd-lib-9.0-r2.ebuild:
+ factorize the bootstrapping code between cross and native builds.
18 May 2012; Alexis Ballier <aballier@gentoo.org> freebsd-lib-9.0-r2.ebuild:
bootstrap the csu with USE=build too
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 05ab77b75d19..19ee32666836 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.20 2012/05/18 16:37:26 aballier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-lib/freebsd-lib-9.0-r2.ebuild,v 1.21 2012/05/18 17:38:01 aballier Exp $
EAPI=2
@@ -225,6 +225,18 @@ NON_NATIVE_SUBDIRS="lib/libc lib/msun gnu/lib/libssp lib/libthr lib/libutil"
# Subdirs for a native build:
NATIVE_SUBDIRS="lib gnu/lib/libssp gnu/lib/libregex"
+# Do we need to bootstrap the csu and libssp_nonshared?
+need_bootstrap() {
+ [ "${CTARGET}" != "${CHOST}" ] || use build
+}
+
+# Bootstrap the core libraries and setup the flags so that the other parts can
+# build against it.
+do_bootstrap() {
+ bootstrap_csu
+ bootstrap_libssp_nonshared
+}
+
src_compile() {
# Does not work with GNU sed
# Force BSD's sed on BSD.
@@ -251,23 +263,16 @@ src_compile() {
mymakeopts="${mymakeopts} NLS="
append-flags "-isystem /usr/${CTARGET}/usr/include"
append-ldflags "-L${WORKDIR}/lib/libc"
-
- bootstrap_csu
-
- bootstrap_libssp_nonshared
-
SUBDIRS="${NON_NATIVE_SUBDIRS}"
else
# Forces to use the local copy of headers with USE=build as they might
# be outdated in the system. Assume they are fine otherwise.
use build && append-flags "-isystem '${WORKDIR}/include_proper'"
-
- use build && bootstrap_csu
- use build && bootstrap_libssp_nonshared
-
SUBDIRS="${NATIVE_SUBDIRS}"
fi
+ need_bootstrap && do_bootstrap
+
export RAW_LDFLAGS=$(raw-ldflags)
# Everything is now setup, build it!