From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id CC55E1381F3 for ; Wed, 24 Jul 2013 01:00:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 970A5E0962; Wed, 24 Jul 2013 01:00:48 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 03A59E0962 for ; Wed, 24 Jul 2013 01:00:47 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A65CE33E865 for ; Wed, 24 Jul 2013 01:00:46 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2139) id 64A332171C; Wed, 24 Jul 2013 01:00:45 +0000 (UTC) From: "Alexis Ballier (aballier)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, aballier@gentoo.org Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/libcxx: ChangeLog libcxx-9999.ebuild X-VCS-Repository: gentoo-x86 X-VCS-Files: ChangeLog libcxx-9999.ebuild X-VCS-Directories: sys-libs/libcxx X-VCS-Committer: aballier X-VCS-Committer-Name: Alexis Ballier Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Message-Id: <20130724010045.64A332171C@flycatcher.gentoo.org> Date: Wed, 24 Jul 2013 01:00:45 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 42037401-e2ca-4f05-997a-3eec1e619061 X-Archives-Hash: fd0398022926faffdb7426815efbcb3c aballier 13/07/24 01:00:45 Modified: ChangeLog libcxx-9999.ebuild Log: provide a shared ldscript for linking in libcxxrt too as its abi is more or less exposed by libcxx headers, bug #477712 (Portage version: 2.2.0_alpha188/cvs/Linux x86_64, signed Manifest commit with key 160F534A) Revision Changes Path 1.25 sys-libs/libcxx/ChangeLog file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?rev=1.25&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?rev=1.25&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/ChangeLog?r1=1.24&r2=1.25 Index: ChangeLog =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v retrieving revision 1.24 retrieving revision 1.25 diff -u -r1.24 -r1.25 --- ChangeLog 3 Jul 2013 21:52:45 -0000 1.24 +++ ChangeLog 24 Jul 2013 01:00:45 -0000 1.25 @@ -1,6 +1,10 @@ # ChangeLog for sys-libs/libcxx # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.24 2013/07/03 21:52:45 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/ChangeLog,v 1.25 2013/07/24 01:00:45 aballier Exp $ + + 24 Jul 2013; Alexis Ballier libcxx-9999.ebuild: + provide a shared ldscript for linking in libcxxrt too as its abi is more or + less exposed by libcxx headers, bug #477712 03 Jul 2013; Alexis Ballier libcxx-9999.ebuild: Go multilib, based on the work of Yuta SATOH in bug #475294 1.17 sys-libs/libcxx/libcxx-9999.ebuild file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild?rev=1.17&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild?rev=1.17&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild?r1=1.16&r2=1.17 Index: libcxx-9999.ebuild =================================================================== RCS file: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- libcxx-9999.ebuild 3 Jul 2013 21:52:45 -0000 1.16 +++ libcxx-9999.ebuild 24 Jul 2013 01:00:45 -0000 1.17 @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v 1.16 2013/07/03 21:52:45 aballier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/libcxx/libcxx-9999.ebuild,v 1.17 2013/07/24 01:00:45 aballier Exp $ EAPI=5 @@ -76,35 +76,47 @@ ./testit || die } +# Usage: deps +gen_ldscript() { + 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 <<-END_LDSCRIPT +/* GNU ld script + Include missing dependencies +*/ +${output_format} +GROUP ( $@ ) +END_LDSCRIPT +} + gen_static_ldscript() { if use libcxxrt ; then # Move it first. - mv "${D}/${EPREFIX}/usr/$(get_libdir)/libc++.a" "${D}/${EPREFIX}/usr/$(get_libdir)/libc++_static.a" || die + mv "${ED}/usr/$(get_libdir)/libc++.a" "${ED}/usr/$(get_libdir)/libc++_static.a" || die # Generate libc++.a ldscript for inclusion of its dependencies so that # clang++ -stdlib=libc++ -static works out of the box. - # 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} )" - local deps="${EPREFIX}/usr/$(get_libdir)/libc++_static.a ${EPREFIX}/usr/$(get_libdir)/libcxxrt.a" # On Linux/glibc it does not link without libpthread or libdl. It is # fine on FreeBSD. use elibc_glibc && deps="${deps} ${EPREFIX}/usr/$(get_libdir)/libpthread.a ${EPREFIX}/usr/$(get_libdir)/libdl.a" - cat > "${D}/${EPREFIX}/usr/$(get_libdir)/libc++.a" <<-END_LDSCRIPT -/* GNU ld script - Include libc++.a dependencies for 'clang++ -stdlib=libc++ -static' to work - out of the box. - */ -${output_format} -GROUP ( ${deps} ) -END_LDSCRIPT + gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.a" fi # TODO: Generate a libc++.a ldscript when building against libsupc++ } +gen_shared_ldscript() { + if use libcxxrt ; then + mv "${ED}/usr/$(get_libdir)/libc++.so" "${ED}/usr/$(get_libdir)/libc++_shared.so" || die + local deps="${EPREFIX}/usr/$(get_libdir)/libc++_shared.so ${EPREFIX}/usr/$(get_libdir)/libcxxrt.so" + gen_ldscript "${deps}" > "${ED}/usr/$(get_libdir)/libc++.so" + fi + # TODO: Generate the linked script for other confiurations too. +} + multilib_src_install() { cd "${BUILD_DIR}/lib" if use static-libs ; then @@ -112,6 +124,7 @@ gen_static_ldscript fi dolib.so libc++.so* + gen_shared_ldscript } multilib_src_install_all() {