summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Haubenwallner <haubi@gentoo.org>2013-11-05 15:03:20 +0000
committerMichael Haubenwallner <haubi@gentoo.org>2013-11-05 15:03:20 +0000
commit4340e5ec2d1b99eb18877663f257c3d47dfe87b7 (patch)
tree280fa95c5313d0ce99fba907791839e43f2365c0 /sys-devel/native-cctools
parentFix bug 478128 (don't mention non-distro upgrades) again. Thanks Nuno J. Silva. (diff)
downloadhistorical-4340e5ec2d1b99eb18877663f257c3d47dfe87b7.tar.gz
historical-4340e5ec2d1b99eb18877663f257c3d47dfe87b7.tar.bz2
historical-4340e5ec2d1b99eb18877663f257c3d47dfe87b7.zip
native-cctools-3: Add mkexpfile helper v1 for AIX.
Package-Manager: portage-2.2.7/cvs/Linux x86_64 Manifest-Sign-Key: 0xA630CCB8
Diffstat (limited to 'sys-devel/native-cctools')
-rw-r--r--sys-devel/native-cctools/ChangeLog10
-rw-r--r--sys-devel/native-cctools/Manifest24
-rw-r--r--sys-devel/native-cctools/files/aix-mkexpfile-156
-rw-r--r--sys-devel/native-cctools/native-cctools-3.ebuild110
4 files changed, 192 insertions, 8 deletions
diff --git a/sys-devel/native-cctools/ChangeLog b/sys-devel/native-cctools/ChangeLog
index bc58ae5cd7b0..f9b8af5cfdeb 100644
--- a/sys-devel/native-cctools/ChangeLog
+++ b/sys-devel/native-cctools/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-devel/native-cctools
-# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-devel/native-cctools/ChangeLog,v 1.3 2011/06/07 12:41:30 haubi Exp $
+# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/native-cctools/ChangeLog,v 1.4 2013/11/05 15:03:13 haubi Exp $
+
+*native-cctools-3 (05 Nov 2013)
+
+ 05 Nov 2013; Michael Haubenwallner <haubi@gentoo.org> +files/aix-mkexpfile-1,
+ +native-cctools-3.ebuild:
+ Add mkexpfile helper v1 for AIX.
*native-cctools-2 (07 Jun 2011)
diff --git a/sys-devel/native-cctools/Manifest b/sys-devel/native-cctools/Manifest
index 91e063efcf2c..b30324c4e77d 100644
--- a/sys-devel/native-cctools/Manifest
+++ b/sys-devel/native-cctools/Manifest
@@ -1,6 +1,18 @@
-AUX ld-aix-1 2866 RMD160 abeebb9ee3350214eaf041aac3d5e15f33d338eb SHA1 3e02815e0f28e689fa892017640b938e378a0a04 SHA256 dfbee0a8908fd069c56746f8b3a601d2e5e090a6ace1ab5f997b32aad1cf182e
-AUX ld-aix-2 2830 RMD160 68b00f6faac04bba8b28d248a7624a4faab54a78 SHA1 e44b560b25f6a213b3865adb7f3eb82ef98fe83d SHA256 32acad7c48719fa289d234e4a3b76bb1ca891fe3f713e9032fbee89a872e675d
-EBUILD native-cctools-1.ebuild 2771 RMD160 e1e8364fbf57d536fe93ccc48c852d45ef1c0813 SHA1 37ebe53ef743e28ffb3eea64ea78baedb85fcb05 SHA256 a34eb0a088022982d2948daa0ada079d6e9c75e64908798675af819e27a3c741
-EBUILD native-cctools-2.ebuild 2771 RMD160 035d273171198582bf32b01fed2113084262aacb SHA1 8bf29c0ccb3f0436ce60be0a31718e505b9e448a SHA256 24960e726601c410bbfb240380a31c0b4b7387cc0d5e452ca2f4fa8e42ea84d7
-MISC ChangeLog 1273 RMD160 d0bc8e6feb5a2a12fe0eb4981f1e1052876d0bce SHA1 aef114cc972a633a8223daf9755da87732f35fcd SHA256 3bdcacdc78f61f01f26427e90b3ce2420500d7f4a5e42e8efaeecf05d4237cb5
-MISC metadata.xml 159 RMD160 daf7422c2bde2c03abbeccce93691898dee7460a SHA1 dac0288d1bc404d23c4d31e83c51d9f9381a2828 SHA256 9f4e165acd1a7bdc5c8ccdb4a40a2e969e056b8463bfe94a1b2e29cc4ef62af4
+-----BEGIN PGP SIGNED MESSAGE-----
+Hash: SHA256
+
+AUX aix-mkexpfile-1 1760 SHA256 774311ab52bf1ff8325ffb9e9e6b3e80582fe83fa9e66743d96fb76c2c1bffb7 SHA512 f3340374a6aecb595e6adde5616a20b25aed28eeab30f8540053d384e400bb5e3752ee9514dd4fff09b1696ff7c679a0584b0202c41274f2cd0a1c5e6eaa4f3d WHIRLPOOL ba9ff250ed4d883bdd4a5e421ecf2b3ae29eb0b1fe89f0f0bab421d1946f52388b63ea3600c364d4a8f4040b3bfb8c4d13682c1e3342b85acb2d93839b5dea81
+AUX ld-aix-1 2866 SHA256 dfbee0a8908fd069c56746f8b3a601d2e5e090a6ace1ab5f997b32aad1cf182e SHA512 cbad8529e36b78e01ca19084229b488ec3a3b4d006910e4e7d83439cc05c12d9c3aa671bb9ca4991a1e0541340430085c3d95de6451e051c21c1c591768fe2d7 WHIRLPOOL c247267d2c2280d6b9bcc16dc8a091446cf271401dacfe8688a70b690b78ed2226213e85b62d33d5f009f11452d7f0d887434223392d4ba3a75bfd3d27a40bc0
+AUX ld-aix-2 2830 SHA256 32acad7c48719fa289d234e4a3b76bb1ca891fe3f713e9032fbee89a872e675d SHA512 b818ae58ceb4be9cb3865074e23b7ad37ede7a07aef0f95255ed8e6ad9ee25d1b72beb3540d382f4cf59e02f25d21d65d5112ff65ae5cfc9da6ae9c73768afda WHIRLPOOL 2b0476764ee67262b5f6ea222493e068271ac8fe429cbafd5d597e10d537df1155e0dd607a26bd416220b8144a66a79bd9a96176ef21eee9b622f64e82514c7d
+EBUILD native-cctools-1.ebuild 2771 SHA256 a34eb0a088022982d2948daa0ada079d6e9c75e64908798675af819e27a3c741 SHA512 f4880238d6578cc995940e5786291c78b3955fac60210b3b306dcf6ede3b278d0e2c8fc297f509ba1bedd14194da914e66d4c3ff319a09c5a5925e72d6a6df71 WHIRLPOOL e1023e7cfa39bbfa4cb7a316c29ad476e59dfc931437728b2ae3b4cdc9a1670c00c005603d60201d574e98e7a5f3ce8548ee81c67be0808fa5debc57eed78ea3
+EBUILD native-cctools-2.ebuild 2771 SHA256 24960e726601c410bbfb240380a31c0b4b7387cc0d5e452ca2f4fa8e42ea84d7 SHA512 ba34ca8b10c118cff9e95f12e8d61101d4f98af7246c79cfd010fe7aa779280eb03ffc963ad32c1054000f4f52a97e326a81a58e39bbd52829e5e6b90ad3cd74 WHIRLPOOL 5081eb3be2a2bef37f0fa5d2802bdbed05b2e1a11dda095fdf4b8e23ed4db1691d592bbe86a187c2583abad02f69b21c12c986f251cd4994d63726a94e5b07e3
+EBUILD native-cctools-3.ebuild 2877 SHA256 f428db19a1d5cb5bbaef517107161d4f008d4adbe806ef3481135c527273de5d SHA512 84e55361e644f5d3595ff8e97a037541a3ea926b59a4263ea0fdca4a576c36bdb6b56a9a026a6122bdd90a418994f3fa4487e5e9052dac6a70292097882747b6 WHIRLPOOL 38a9ed71cec2f0f50a7c8479bdc3a6632a1512922fcacd87c01c29835ac47656b33925f36782123515e46b92be39b9e323050bd7a4d40065a25685714493aa9c
+MISC ChangeLog 1450 SHA256 b5ab8877593c3089a159bfde79059e79623112dbe0a28bd761be494d50b407f9 SHA512 0011dcd73940100af691f78d2b6317bcba66fc8014d7de4f9639b191e3e379b58d6a2538250f0c8eea78c85fa915834171bf19c59a4316888921a9e34f2659a9 WHIRLPOOL ada77d8734e4521b0139b977821c9ecc1f990dbec58d9c2431b09f0d3c0259167689509b25513ffccef052268506d0d14f8a93b4961561185ca9d66f4ffef0c5
+MISC metadata.xml 159 SHA256 9f4e165acd1a7bdc5c8ccdb4a40a2e969e056b8463bfe94a1b2e29cc4ef62af4 SHA512 dea494c8d7e5c95051ffe93b7d507732ed69dca5aeb2dd4c4c5250dd268e8818f1a96f41e478e0ab66e3f54e00bcccbfb621d4b386724e1a643186278f9bcd9a WHIRLPOOL fcfffa139b0ba0a23600d20232bd83c05c80564830d3ec75f4e43ee84c735cf1e733dd28bff711cc91e4eda0709033938fc7de247d6621d8adb224b306d2e992
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v2.0.20 (GNU/Linux)
+
+iEYEAREIAAYFAlJ5CLUACgkQLc0TWKYwzLiYYwCdElGnSo66nzq54q6G6zMRWOfJ
+h0gAn0qJORdi8xsciZTfnZQuWQmcWsVK
+=lGa4
+-----END PGP SIGNATURE-----
diff --git a/sys-devel/native-cctools/files/aix-mkexpfile-1 b/sys-devel/native-cctools/files/aix-mkexpfile-1
new file mode 100644
index 000000000000..7b36f3bc1f7a
--- /dev/null
+++ b/sys-devel/native-cctools/files/aix-mkexpfile-1
@@ -0,0 +1,56 @@
+#! /usr/bin/env bash
+# Copyright 2013-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/native-cctools/files/aix-mkexpfile-1,v 1.1 2013/11/05 15:03:13 haubi Exp $
+
+# Creating shared libraries on AIX involves lots of commands. While there is
+# the ld-wrapper supporting the '-soname' flag already, it also is necessary
+# to create the list of exported symbols from all the local object files only,
+# because with the -bexpfull linker flag we would export symbols from static
+# objects found in libc.a too, which should be privately linked into
+# subsequent shared libs instead of importing them from current sharedlib.
+
+# Also, -bexpfull may trigger this AIX 7.1 kernel bug:
+# https://www-304.ibm.com/support/docview.wss?uid=isg1IV39558
+
+# Example to use this helper script, in combination with ld-wrapper:
+# gcc -shared -soname=lib.so.1 -o lib.so *.o -Wl,-bexport:`mkexpfile *.o`
+
+nm=${0%mkexpfile}nm
+showwith=
+expfile="ld.aix.exports.$$"
+srcobjs=()
+
+while [[ $# -gt 0 ]]
+do
+ arg=$1
+ shift
+
+ case ${arg} in
+ --) srcobjs=( "${srcobjs[@]}" "$@" ); break ;;
+ --show-with=*) showwith=${arg#--show-with=} ;;
+ -o) expfile=$1; shift ;;
+ -o*) expfile=${arg#-o}; ;;
+ *) srcobjs=( "${srcobjs[@]}" "${arg}" ) ;;
+ esac
+done
+
+rm -f "${expfile}" || exit 1
+
+type ${nm} >/dev/null 2>&1 || nm=nm
+
+${nm} -PCpgl "${srcobjs[@]}" |
+ awk '{
+ if ((($2 == "T") || ($2 == "D") || ($2 == "B") || ($2 == "W") || ($2 == "V") || ($2 == "Z")) && (substr($1,1,1) != ".")) {
+ if (($2 == "W") || ($2 == "V") || ($2 == "Z")) {
+ print $1 " weak"
+ } else {
+ print $1
+ }
+ }
+ }' |
+ sort -u > "${expfile}" || exit 1
+
+printf "%s\n" "${showwith}${expfile}"
+
+exit 0
diff --git a/sys-devel/native-cctools/native-cctools-3.ebuild b/sys-devel/native-cctools/native-cctools-3.ebuild
new file mode 100644
index 000000000000..0cb79b0c8e91
--- /dev/null
+++ b/sys-devel/native-cctools/native-cctools-3.ebuild
@@ -0,0 +1,110 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/native-cctools/native-cctools-3.ebuild,v 1.1 2013/11/05 15:03:13 haubi Exp $
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="Host OS native assembler as and static linker ld"
+HOMEPAGE="http://youroperatingsystem.com/"
+SRC_URI=""
+
+LICENSE="GPL-2" # actually, we don't know, the wrapper is
+SLOT="0"
+
+AIX_LD_V=2
+AIX_MKEXPFILE_V=1
+
+KEYWORDS="~ppc-aix ~x86-interix ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris"
+
+IUSE=""
+
+DEPEND="sys-devel/binutils-config"
+RDEPEND="${DEPEND}"
+
+src_install() {
+ LIBPATH=/usr/$(get_libdir)/binutils/${CHOST}/native-${PV}
+ BINPATH=/usr/${CHOST}/binutils-bin/native-${PV}
+
+ keepdir ${LIBPATH} || die
+ dodir ${BINPATH} || die
+
+ # allow for future hosts with different paths
+ nativepath=""
+ wrappers=()
+ case ${CHOST} in
+ *-solaris*)
+ nativepath=/usr/sfw/bin
+ ;;
+ *-aix*)
+ nativepath=/usr/ccs/bin
+ wrappers=("${wrappers[@]}" "ld=${FILESDIR}/ld-aix-${AIX_LD_V}")
+ wrappers=("${wrappers[@]}" "mkexpfile=${FILESDIR}/aix-mkexpfile-${AIX_MKEXPFILE_V}")
+ ;;
+ *-apple-darwin*|*-netbsd*|*-openbsd*)
+ nativepath=/usr/bin
+ ;;
+ *-interix*)
+ nativepath=/opt/gcc.3.3/bin
+ ;;
+ *)
+ die "Don't know where the native linker for your platform is"
+ ;;
+ esac
+
+ what="addr2line as ar c++filt gprof ld nm objcopy objdump \
+ ranlib readelf elfdump size strings strip"
+ # Darwin things
+ what="${what} install_name_tool ld64 libtool lipo nmedit \
+ otool otool64 pagestuff redo_prebinding segedit"
+
+ # copy from the host os
+ cd "${ED}${BINPATH}"
+ for b in ${what} ; do
+ if [[ ${CHOST} == *-darwin* && ${b} == libtool ]] ; then
+ echo "linking darwin libtool ${nativepath}/${b}"
+ ln -s "${nativepath}/${b}" "${b}"
+ elif [[ -x ${nativepath}/g${b} ]] ; then
+ einfo "linking ${nativepath}/g${b}"
+ ln -s "${nativepath}/g${b}" "${b}"
+ elif [[ -x ${nativepath}/${b} ]] ; then
+ einfo "linking ${nativepath}/${b}"
+ ln -s "${nativepath}/${b}" "${b}"
+ else
+ ewarn "skipping ${b} (not in ${nativepath})"
+ fi
+ done
+
+ # post fix for Darwin's ranlib (doesn't like it when its called other than
+ # that, as libtool and ranlib are one tool)
+ if [[ ${CHOST} == *-darwin* ]] ; then
+ rm -f ranlib
+ cat <<-EOF > ranlib
+ #!/usr/bin/env bash
+ exec ${nativepath}/ranlib "\$@"
+ EOF
+ chmod 755 ranlib
+ fi
+
+ exeinto ${BINPATH}
+ local wrapper source target
+ for wrapper in "${wrappers[@]}" ; do
+ source=${wrapper#*=}
+ target=${wrapper%%=*}
+ newexe "${source}" "${target}" || die
+ done
+ # Generate an env.d entry for this binutils
+ insinto /etc/env.d/binutils
+ cat <<-EOF > "${T}"/env.d
+ TARGET="${CHOST}"
+ VER="native-${PV}"
+ LIBPATH="${EPREFIX}/${LIBPATH}"
+ FAKE_TARGETS="${CHOST}"
+ EOF
+ newins "${T}"/env.d ${CHOST}-native-${PV}
+}
+
+pkg_postinst() {
+ binutils-config ${CHOST}-native-${PV}
+}