public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Yuta SATOH" <nigoro.gentoo@0x100.com>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/gentoo-bsd:master commit in: sys-freebsd/freebsd-lib/
Date: Tue, 18 Jun 2013 12:57:28 +0000 (UTC)	[thread overview]
Message-ID: <1371558349.6e9aa0ee4da801a218885b463d0e157e475d3e3b.yuta_satoh@gentoo> (raw)

commit:     6e9aa0ee4da801a218885b463d0e157e475d3e3b
Author:     Yuta SATOH <nigoro <AT> gentoo <DOT> gr <DOT> jp>
AuthorDate: Tue Jun 18 12:25:49 2013 +0000
Commit:     Yuta SATOH <nigoro.gentoo <AT> 0x100 <DOT> com>
CommitDate: Tue Jun 18 12:25:49 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/gentoo-bsd.git;a=commit;h=6e9aa0ee

freebsd-lib-9.9999: sync to 9.1-r5 ebuild.

---
 sys-freebsd/freebsd-lib/Manifest                  |   2 +-
 sys-freebsd/freebsd-lib/freebsd-lib-9.9999.ebuild | 100 ++++++++++------------
 2 files changed, 45 insertions(+), 57 deletions(-)

diff --git a/sys-freebsd/freebsd-lib/Manifest b/sys-freebsd/freebsd-lib/Manifest
index 2ee4a60..a7713e5 100644
--- a/sys-freebsd/freebsd-lib/Manifest
+++ b/sys-freebsd/freebsd-lib/Manifest
@@ -18,4 +18,4 @@ AUX freebsd-sources-9.0-sysctluint.patch 403 SHA256 884fbc5d6d3766ea3d4609946f56
 AUX libmap.conf 201 SHA256 36a1bd56965f171cbb058f6e1762801e3b92c083fe36f6fe046bd669beed9742 SHA512 abc358dff495fe96b9ed549bacb5278577ca4da46b89b87e9211a2f6acdd455111df02ba11b797287f839af6cc22f8810e8ac1dc52154acc8b22364e667b3c49 WHIRLPOOL 0827a0ea9b8a2faed019d13356a793b2b572e54d6f8ebf32a9f12214759153433e21f7d8fdedf43e038ac1925432c1f4843441db47d29895eda51781f1fedb5e
 AUX libusb-1.0.pc.in 207 SHA256 edf35e887cbfed2df288825434c467e0a946eeb21e0d631f55940bb177c2ba15 SHA512 93289cecfc298a31fd4fd0848bf25a63048a7549bd81792d7bd158731246221c24ec9f469a918430da56873a0936fb2b372cedaaa32a38ccd5323de0f9a89b93 WHIRLPOOL 7c81b0df4548a9391b4e1420186f1e970aa9e2e73a89e817adbff9de52b8797cbd8a4d8b3ca01f782f86e4b1e48fad72a08b5bff49d5ee6ffaa5135c015ca5ae
 AUX libusb.pc.in 208 SHA256 9bfe398a335f8b9b1c3dd167ab0c9206fe3bdd4e1da318ece977e20f3c2d7c56 SHA512 e9c6d5f04057cf8c13f69a3d8e07bdd517fdb01d572a69a1beb397766311b3c53894b108caaaea740bfc27b227a9620621dac5846bff1a367fbf9954f38bb40c WHIRLPOOL e80e76a8a564655d924a7148a841c7c7cf0be0ea3bdbd76e95e5004124543826e5d925dfe791f4b040e042a10923865bb517499d9f5be39611fedbcceebe32d8
-EBUILD freebsd-lib-9.9999.ebuild 17460 SHA256 1a367b4522c4b7566540cceb4f577afa317415c079d2b1013e69994021080ea2 SHA512 eeabb1b2da5c914d9a7982379d0ed9bc4fcc958a7270ee2f21193fb4409c306ae20c1a029117e69be441252e05ab71159e9ab839e3b7d591d382f5f61d83eacf WHIRLPOOL 4c75472702098f61424ec464487d7e475547514b85912a1bd35c8d0158ce4b2149f3e73793f818ce16bb7e4475fd926dfd4a05b6d8ec3aa9b50abb8f5097715c
+EBUILD freebsd-lib-9.9999.ebuild 17168 SHA256 c6e4d4a9f368780e1ff048c247adbdd6be7ee8590a6eb1735a4b59940c970c46 SHA512 58a4880172244ca80fc3eb65d3e35e98596c5a0c7b29e36a3fe11ab9846814091265a2cf91d4edd61d9b31ed32bfc38cc6be5a1a5b7a33019bee0a2de4b306ff WHIRLPOOL eb33b5f83268283a35af775dee2dd6cd7c476920c1b93b76fe300a3383424a482417652789a0b8909e5c04d72f8fde14ddfc1308ea8f3264f9a190396de214e7

diff --git a/sys-freebsd/freebsd-lib/freebsd-lib-9.9999.ebuild b/sys-freebsd/freebsd-lib/freebsd-lib-9.9999.ebuild
index 8c1f35d..7a712d7 100644
--- a/sys-freebsd/freebsd-lib/freebsd-lib-9.9999.ebuild
+++ b/sys-freebsd/freebsd-lib/freebsd-lib-9.9999.ebuild
@@ -2,9 +2,9 @@
 # Distributed under the terms of the GNU General Public License v2
 # $Header: $
 
-EAPI=2
+EAPI=5
 
-inherit bsdmk freebsd flag-o-matic multilib toolchain-funcs eutils
+inherit bsdmk freebsd flag-o-matic multilib toolchain-funcs eutils multibuild
 
 DESCRIPTION="FreeBSD's base system libraries"
 SLOT="0"
@@ -106,7 +106,6 @@ PATCHES=(
 # - archiving libraries (have their own ebuild)
 # - sendmail libraries (they are installed by sendmail)
 # - SNMP library and dependency (have their own ebuilds)
-# - Clang (compiler_rt and blocksruntime)
 #
 # The rest are libraries we already have somewhere else because
 # they are contribution.
@@ -118,11 +117,13 @@ REMOVE_SUBDIRS="ncurses \
 	libz libbz2 libarchive liblzma \
 	libsm libsmdb libsmutil \
 	libbegemot libbsnmp \
-	libcompiler_rt libblocksruntime \
 	libpam libpcap bind libwrap libmagic \
 	libcom_err libtelnet
 	libelf libedit"
 
+# For doing multilib over multibuild.eclass
+MULTIBUILD_VARIANTS=( $(get_all_abis) )
+
 # Are we building a cross-compiler?
 is_crosscompile() {
 	[ "${CATEGORY#*cross-}" != "${CATEGORY}" ]
@@ -221,6 +222,15 @@ bootstrap_csu() {
 
 	CFLAGS="${CFLAGS} -B ${MAKEOBJDIRPREFIX}/${WORKDIR}/${csudir}"
 	append-ldflags "-B ${MAKEOBJDIRPREFIX}/${WORKDIR}/${csudir}"
+
+	cd "${WORKDIR}/gnu/lib/csu" || die
+	freebsd_src_compile
+	cd "${MAKEOBJDIRPREFIX}/${WORKDIR}/gnu/lib/csu"
+	for i in *.So ; do
+		ln -s $i ${i%.So}S.o
+	done
+	CFLAGS="${CFLAGS} -B ${MAKEOBJDIRPREFIX}/${WORKDIR}/gnu/lib/csu"
+	append-ldflags "-B ${MAKEOBJDIRPREFIX}/${WORKDIR}/gnu/lib/csu"
 }
 
 # Compile libssp_nonshared.a and add it's path to LDFLAGS.
@@ -231,12 +241,28 @@ bootstrap_libssp_nonshared() {
 	export LDADD="-lssp_nonshared"
 }
 
+bootstrap_libgcc() {
+	cd "${WORKDIR}/lib/libcompiler_rt" || die
+	freebsd_src_compile
+	cd "${MAKEOBJDIRPREFIX}/${WORKDIR}/lib/libcompiler_rt" || die
+	ln -s libcompiler_rt.a libgcc.a || die
+	append-ldflags "-L${MAKEOBJDIRPREFIX}/${WORKDIR}/lib/libcompiler_rt"
+
+	cd "${WORKDIR}/lib/libc" || die
+	freebsd_src_compile
+	append-ldflags "-L${MAKEOBJDIRPREFIX}/${WORKDIR}/lib/libc"
+
+	cd "${WORKDIR}/gnu/lib/libgcc" || die
+	freebsd_src_compile
+	append-ldflags "-L${MAKEOBJDIRPREFIX}/${WORKDIR}/gnu/lib/libgcc"
+}
+
 # What to build for a non-native build: cross-compiler, non-native abi in
 # multilib. We also need the csu but this has to be handled separately.
 NON_NATIVE_SUBDIRS="lib/libc lib/msun gnu/lib/libssp/libssp_nonshared lib/libthr lib/libutil"
 
 # Subdirs for a native build:
-NATIVE_SUBDIRS="lib gnu/lib/libssp/libssp_nonshared gnu/lib/libregex gnu/lib/csu"
+NATIVE_SUBDIRS="lib gnu/lib/libssp/libssp_nonshared gnu/lib/libregex gnu/lib/csu gnu/lib/libgcc"
 
 # Is my $ABI native ?
 is_native_abi() {
@@ -272,14 +298,13 @@ get_subdirs() {
 			ret="$(get_csudir $(tc-arch-kernel ${CHOST})) ${ret}"
 		fi
 	else
-		# Only build the csu parts and core libraries for now.
-		ret="gnu/lib/libssp/libssp_nonshared gnu/lib/csu"
+		# Finally, with a non-native ABI without USE=build, we build the most
+		# important libraries.
+		ret="${NON_NATIVE_SUBDIRS} gnu/lib/csu lib/libcompiler_rt gnu/lib/libgcc lib/libmd lib/libcrypt"
+
 		if [ "${EBUILD_PHASE}" = "install" ]; then
 			ret="$(get_csudir $(tc-arch-kernel ${CHOST})) ${ret}"
 		fi
-		# Finally, with a non-native ABI without USE=build, we build everything
-		# too.
-		#ret="${NATIVE_SUBDIRS}"
 	fi
 	echo "${ret}"
 }
@@ -294,24 +319,24 @@ do_bootstrap() {
 		einfo "Pre-installing includes in include_proper_${ABI}"
 		mkdir "${WORKDIR}/include_proper_${ABI}" || die
 		CTARGET="${CHOST}" install_includes "/include_proper_${ABI}"
-		CFLAGS="${CFLAGS} -isystem ${WORKDIR}/include_proper_${ABI}"
+		CFLAGS="${CFLAGS} -I ${WORKDIR}/include_proper_${ABI}"
 	fi
 	bootstrap_csu
 	bootstrap_libssp_nonshared
+	if ! is_crosscompile && ! is_native_abi ; then
+		# Bootstrap the compiler libs
+		bootstrap_libgcc
+	fi
 }
 
 # Compile it. Assume we have the toolchain setup correctly.
 do_compile() {
-	export MAKEOBJDIRPREFIX="${WORKDIR}/${CHOST}"
-	mkdir "${MAKEOBJDIRPREFIX}" || die "Could not create ${MAKEOBJDIRPREFIX}."
 	# Bootstrap if needed, otherwise assume the system headers are in
 	# /usr/include.
 	if need_bootstrap ; then
 		[[ "$(tc-getCC)" == *gcc* ]] && export COMPILER_TYPE="gcc"
 		[[ "$(tc-getCC)" == *clang* ]] && export COMPILER_TYPE="clang"
 		do_bootstrap
-	else
-		CFLAGS="${CFLAGS} -isystem /usr/include"
 	fi
 
 	export RAW_LDFLAGS=$(raw-ldflags)
@@ -358,31 +383,7 @@ src_compile() {
 	if is_crosscompile ; then
 		do_compile
 	else
-		for ABI in $(get_all_abis) ; do
-			# First, save the variables: CFLAGS, CXXFLAGS, LDFLAGS and mymakeopts.
-			for i in CFLAGS CXXFLAGS LDFLAGS mymakeopts ; do
-				export ${i}_SAVE="${!i}"
-			done
-
-			multilib_toolchain_setup ${ABI}
-
-			local target="$(tc-arch-kernel ${CHOST})"
-			mymakeopts="${mymakeopts} TARGET=${target} MACHINE=${target} MACHINE_ARCH=${target}"
-			CFLAGADD=""
-			if ! is_native_abi ; then
-				mymakeopts="${mymakeopts} COMPAT_32BIT="
-			fi
-
-			einfo "Building for ABI ${ABI} and TARGET=$(tc-arch-kernel ${CHOST})"
-
-			CTARGET="${CHOST}" do_compile
-
-			# Restore the variables now.
-			for i in CFLAGS CXXFLAGS LDFLAGS mymakeopts ; do
-				ii="${i}_SAVE"
-				export ${i}="${!ii}"
-			done
-		done
+		multibuild_foreach_variant freebsd_multilib_multibuild_wrapper do_compile
 	fi
 }
 
@@ -422,7 +423,6 @@ END_LDSCRIPT
 }
 
 do_install() {
-	export MAKEOBJDIRPREFIX="${WORKDIR}/${CHOST}"
 	for i in $(get_subdirs) ; do
 		einfo "Installing in ${i}..."
 		cd "${WORKDIR}/${i}/" || die "missing ${i}."
@@ -439,7 +439,6 @@ src_install() {
 	install_includes ${INCLUDEDIR}
 
 	use crosscompile_opts_headers-only && return 0
-	local mylibdir=$(get_libdir)
 
 	if is_crosscompile ; then
 		mymakeopts="${mymakeopts} NO_MAN= \
@@ -450,19 +449,8 @@ src_install() {
 		dosym "usr/include" "/usr/${CTARGET}/sys-include"
 		do_install
 	else
-		if ! use multilib ; then
-			# Set SHLIBDIR and LIBDIR for multilib
-			mymakeopts="${mymakeopts} SHLIBDIR=/usr/${mylibdir} LIBDIR=/usr/${mylibdir}"
-			do_install
-		else
-			for ABI in $(get_all_abis) ; do
-				mymakeopts_SAVE="${mymakeopts}"
-				multilib_toolchain_setup ${ABI}
-				mymakeopts="${mymakeopts} SHLIBDIR=/usr/$(get_libdir) LIBDIR=/usr/$(get_libdir)"
-				do_install
-				mymakeopts="${mymakeopts_SAVE}"
-			done
-		fi
+		export STRIP_MASK="*/usr/lib*/*crt*.o"
+		multibuild_foreach_variant freebsd_multilib_multibuild_wrapper do_install
 	fi
 
 	# Don't install the rest of the configuration files if crosscompiling
@@ -487,7 +475,7 @@ src_install() {
 	gen_usr_ldscript -a alias cam geom ipsec jail kiconv \
 		kvm m md procstat sbuf thr ufs util
 
-	gen_libc_ldscript "${mylibdir}" "usr/${mylibdir}" "usr/${mylibdir}"
+	gen_libc_ldscript "$(get_libdir)" "usr/$(get_libdir)" "usr/$(get_libdir)"
 
 	# Install a libusb.pc for better compat with Linux's libusb
 	if use usb ; then


             reply	other threads:[~2013-06-18 12:57 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-18 12:57 Yuta SATOH [this message]
  -- strict thread matches above, loose matches on Subject: below --
2016-10-09  8:28 [gentoo-commits] proj/gentoo-bsd:master commit in: sys-freebsd/freebsd-lib/ Yuta SATOH
2015-02-23 12:23 Yuta SATOH
2014-12-12 14:30 Yuta SATOH
2014-09-13  7:20 Yuta SATOH
2014-08-31  5:07 Yuta SATOH
2014-08-31  5:07 Yuta SATOH
2014-08-31  5:07 Yuta SATOH
2014-07-13  3:14 Yuta SATOH
2014-05-11  9:57 Yuta SATOH
2014-01-25 12:51 Yuta SATOH
2013-12-19 11:17 Yuta SATOH
2013-10-28 14:12 Yuta SATOH
2013-10-22 14:14 Yuta SATOH
2013-09-29 14:43 Yuta SATOH
2013-09-29 14:43 Yuta SATOH
2013-09-22 12:41 Yuta SATOH
2013-09-16 13:14 Yuta SATOH
2013-08-31 16:01 Yuta SATOH
2013-08-30 18:30 Yuta SATOH
2013-07-27 12:39 Yuta SATOH
2013-07-23 12:44 Yuta SATOH
2013-07-05 11:12 Yuta SATOH
2013-06-28 13:36 Yuta SATOH
2013-06-20 15:30 Yuta SATOH
2013-06-20 15:30 Yuta SATOH
2013-06-20 12:20 Yuta SATOH
2013-06-04 11:11 Yuta SATOH
2013-05-16 11:17 Yuta SATOH
2013-02-07 13:14 Yuta SATOH
2013-01-26 13:16 Yuta SATOH
2013-01-12 11:09 Yuta SATOH
2013-01-10 11:58 Yuta SATOH
2013-01-01 15:10 Yuta SATOH
2012-12-31  9:51 Yuta SATOH
2012-12-11 15:07 Yuta SATOH
2012-12-02 12:01 Yuta SATOH
2012-12-01 14:24 Yuta SATOH
2012-09-19 15:25 Yuta SATOH
2012-09-18 15:46 Yuta SATOH
2012-08-04 10:10 Yuta SATOH
2012-07-27 12:25 Yuta SATOH

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1371558349.6e9aa0ee4da801a218885b463d0e157e475d3e3b.yuta_satoh@gentoo \
    --to=nigoro.gentoo@0x100.com \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox