diff options
author | Michael Haubenwallner <haubi@gentoo.org> | 2013-11-08 14:19:36 +0000 |
---|---|---|
committer | Michael Haubenwallner <haubi@gentoo.org> | 2013-11-08 14:19:36 +0000 |
commit | 91b7c47a2550111a072c7a96b0309a160d1a3290 (patch) | |
tree | 646c436abb39bc4279cbe3c8d08a616a0a078d48 /sys-devel | |
parent | Fix systems where the stack grows up (bug #490746). (diff) | |
download | historical-91b7c47a2550111a072c7a96b0309a160d1a3290.tar.gz historical-91b7c47a2550111a072c7a96b0309a160d1a3290.tar.bz2 historical-91b7c47a2550111a072c7a96b0309a160d1a3290.zip |
+native-cctools-4: Wrapp AIX nm for long TMPDIR. Group AIX wrappers in one subdir.
Package-Manager: portage-2.2.7/cvs/Linux x86_64
Manifest-Sign-Key: 0xA630CCB8
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/native-cctools/ChangeLog | 9 | ||||
-rw-r--r-- | sys-devel/native-cctools/Manifest | 14 | ||||
-rw-r--r-- | sys-devel/native-cctools/files/aix-2/ld | 139 | ||||
-rw-r--r-- | sys-devel/native-cctools/files/aix-2/mkexpfile | 70 | ||||
-rw-r--r-- | sys-devel/native-cctools/files/aix-2/nm | 6 | ||||
-rw-r--r-- | sys-devel/native-cctools/files/aix-mkexpfile-1 | 56 | ||||
-rw-r--r-- | sys-devel/native-cctools/native-cctools-4.ebuild (renamed from sys-devel/native-cctools/native-cctools-3.ebuild) | 11 |
7 files changed, 237 insertions, 68 deletions
diff --git a/sys-devel/native-cctools/ChangeLog b/sys-devel/native-cctools/ChangeLog index f9b8af5cfdeb..2f7d17ea8769 100644 --- a/sys-devel/native-cctools/ChangeLog +++ b/sys-devel/native-cctools/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for sys-devel/native-cctools # 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 $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/native-cctools/ChangeLog,v 1.5 2013/11/08 14:19:30 haubi Exp $ + +*native-cctools-4 (08 Nov 2013) + + 08 Nov 2013; Michael Haubenwallner <haubi@gentoo.org> -files/aix-mkexpfile-1, + +files/aix-2/ld, +files/aix-2/mkexpfile, +files/aix-2/nm, + -native-cctools-3.ebuild, +native-cctools-4.ebuild: + Wrapp AIX nm for long TMPDIR. Group AIX wrappers in one subdir. *native-cctools-3 (05 Nov 2013) diff --git a/sys-devel/native-cctools/Manifest b/sys-devel/native-cctools/Manifest index b30324c4e77d..ba0f5f2b52c0 100644 --- a/sys-devel/native-cctools/Manifest +++ b/sys-devel/native-cctools/Manifest @@ -1,18 +1,20 @@ -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 -AUX aix-mkexpfile-1 1760 SHA256 774311ab52bf1ff8325ffb9e9e6b3e80582fe83fa9e66743d96fb76c2c1bffb7 SHA512 f3340374a6aecb595e6adde5616a20b25aed28eeab30f8540053d384e400bb5e3752ee9514dd4fff09b1696ff7c679a0584b0202c41274f2cd0a1c5e6eaa4f3d WHIRLPOOL ba9ff250ed4d883bdd4a5e421ecf2b3ae29eb0b1fe89f0f0bab421d1946f52388b63ea3600c364d4a8f4040b3bfb8c4d13682c1e3342b85acb2d93839b5dea81 +AUX aix-2/ld 2830 SHA256 a7720ca89519e5b45c66c46af1c49594ebc5ba714250b35550064e122b01eef2 SHA512 57d5f1d874cd30de1c6335c80ff10ae9f7d0ab20c6aefab9f25b955b8792e86ab5cfa89b2688aa86334acad07a9e5128296d9daf30c0c20ee336cc5ad1462c59 WHIRLPOOL 36e724dd1516097a96e5d2402379181d459ecefe0fa92119fc859d072f6618d44c42019b9d8d1f9d0b49411cb84c748a40f3771590936be60553a280baa30e86 +AUX aix-2/mkexpfile 1535 SHA256 4ba886dd45b53cb9109eea2722b7cbb720b07d4afce8fcd21cb7977d3be39520 SHA512 51491a3b215b2efcbf3a14ee7cc90ea6e9062eb98a939e88671b288cbd8262864aec8cffe481689ba325c1aed125881a2c6a375eff1bb1f4f9902f29b53944c6 WHIRLPOOL bfdea62c671c2b6829e35be48e43b5d6162d90820139703d7f5dd3b7a7b0fd3aa76af479374dc590e0afa821498ce70a692d9bf09dfbec7cf3bb1838167b1ec1 +AUX aix-2/nm 176 SHA256 e3ff019fc3ba6d12841c62b23bc676cf1338ad4af02fd5ba0da3189a825133c8 SHA512 d5206f7bf3ce54f79c292f9734b028aa8c9d0db811db4cb6ef2a4570f3bd13e38b2e41def4d6053a3794dd0f5ed81b485deee4d27c3db6462035071d7c522411 WHIRLPOOL b3192f2c36685b99b0840c4c0abd36b99f8ae7b823d8cdd0a5a375dda9af475e36bc3a681ca72a8522f9ca8a79d0f230335d15617a98ecdc2969b2ebf31f1ad4 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 +EBUILD native-cctools-4.ebuild 2921 SHA256 ef4e558f56f795bbf92946ec710e228f3a3c5b27382fcaf5ba0618e5a752e5df SHA512 b24af743f1cbeaf3424f5bb973fe48ebaa79e6f33c11287f0ba74486ee9beff5ce2dfddaba369a043067ac9f231dd3a3d5d98b6089b54011ec3ac2a3a18c24ac WHIRLPOOL 722a11078e596931afd6da90fb0bb36e2c8fb1ca8dc0e6d5b3620212095d46d17dfd9caf5c63abbab85b16740c15204d9f8c1c76b92646cb3241695f46388c0b +MISC ChangeLog 1744 SHA256 8adcc5fe7a4a03bf6756ae2fc53f8430b0be6d3e180821bfacbbb6230069ce0a SHA512 1313ff60d279004a0f896fbce435f76b05def9d5d2e2ff5b534c58bdc4b169a6601c92969bb63261cdfd59870617c616e81acbb9e28dc46d0a702ef8e49d8a86 WHIRLPOOL ac30ba345a8c48fe9cbc5812c75c626bf9c4a2bf7dc994a14984d8d24ce95b58d852a910d5f731117170370b54c2fe46ac37a21698c76a80e4e6fc78f906406e MISC metadata.xml 159 SHA256 9f4e165acd1a7bdc5c8ccdb4a40a2e969e056b8463bfe94a1b2e29cc4ef62af4 SHA512 dea494c8d7e5c95051ffe93b7d507732ed69dca5aeb2dd4c4c5250dd268e8818f1a96f41e478e0ab66e3f54e00bcccbfb621d4b386724e1a643186278f9bcd9a WHIRLPOOL fcfffa139b0ba0a23600d20232bd83c05c80564830d3ec75f4e43ee84c735cf1e733dd28bff711cc91e4eda0709033938fc7de247d6621d8adb224b306d2e992 -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (GNU/Linux) -iEYEAREIAAYFAlJ5CLUACgkQLc0TWKYwzLiYYwCdElGnSo66nzq54q6G6zMRWOfJ -h0gAn0qJORdi8xsciZTfnZQuWQmcWsVK -=lGa4 +iEYEAREIAAYFAlJ88vUACgkQLc0TWKYwzLj5iACfWXa4vdFmQnGb9xUdIigMWgGp +tO0AniRLgp+YY97vZvncyuXZsMTALjnI +=cgeh -----END PGP SIGNATURE----- diff --git a/sys-devel/native-cctools/files/aix-2/ld b/sys-devel/native-cctools/files/aix-2/ld new file mode 100644 index 000000000000..f71edea7f590 --- /dev/null +++ b/sys-devel/native-cctools/files/aix-2/ld @@ -0,0 +1,139 @@ +#! /usr/bin/env /bin/ksh +# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-devel/native-cctools/files/aix-2/ld,v 1.1 2013/11/08 14:19:30 haubi Exp $ + +# Upon '-soname' and similar flags, create a "shared library" on AIX being an +# archive file containing an Import File and the shared object file, as in: +# http://lists.gnu.org/archive/html/libtool/2011-01/msg00023.html +# with updates in: +# http://lists.gnu.org/archive/html/libtool/2011-02/msg00000.html +# +# This helper script is meant not depend on anything Gentoo specific. + +ld=/usr/ccs/bin/ld +ar=/usr/ccs/bin/ar +strip=/usr/ccs/bin/strip +dump=/usr/sbin/dump +awk=/usr/bin/awk +rm=/usr/bin/rm +mkdir=/usr/bin/mkdir +mv=/usr/bin/mv +ln=/usr/bin/ln + +oldargs= +output= +soname= +newargs= +OBJECT_MODE=${OBJECT_MODE:-32} + +while [[ $# -gt 0 ]] +do + arg=$1 + shift + oldargs="${oldargs} '${arg}'" + case ${arg} in + -o) + newargs="${newargs} -o '$1'" + output=$1 + oldargs="${oldargs} '$1'" + shift + ;; + -bM:SRE) + newargs="${newargs} '-G' '-bernotok'" + ;; + -soname=*) + soname=${arg#-soname=} + ;; + -h*) + soname=${arg#-h} + ;; + -soname|-h) + soname=$1 + shift + ;; + -b32) + newargs="${newargs} '${arg}'" + OBJECT_MODE=32 + ;; + -b64) + newargs="${newargs} '${arg}'" + OBJECT_MODE=64 + ;; + *) + newargs="${newargs} '${arg}'" + ;; + esac +done + +if [[ -z ${output} || -z ${soname} ]]; then + eval "exec ${ld} ${oldargs}" + exit 1 +fi + +# Running ld against the orginal target file to retain +# ld error message when there's a problem with it: +eval "${ld} -o '${output}' ${newargs}" || exit 1 + +workdir="${output}.$$" + +${rm} -rf "${workdir}" || exit 1 +trap "${rm} -rf '${workdir}'" 0 + +case ${soname} in +*\(*\)) + shro=${soname#*\(} + shro=${shro%\)} + shri=${shro%.*}.imp + ;; +*\[*\]) + shro=${soname#*\[} + shro=${shro%\]} + shri=${shro%.*}.imp + ;; +none) # loadable only module, not linkable: no import file + shro='shr.o' + soname="${output##*/}(${shro})" + shri= + ;; +auto) + shro='shr.o' + soname=${output##*/} + if [[ ${soname} == lib*.so* ]]; then + # linkable library: need import file + shri=${shro%.*}.imp + else + # loadable only module, not linkable: no import file + shri= + fi + soname="${soname}(${shro})" + ;; +*) + shro='shr.o' + shri=${shro%.*}.imp + soname="${soname}(${shro})" + ;; +esac + +export OBJECT_MODE + +${mkdir} "${workdir}" || exit 1 +${strip} -e "${output}" || exit 1 +if [[ -n ${shri} ]]; then + ${dump} -Tv "${output}" > "${workdir}"/syms || exit 1 + ${awk} ' + BEGIN { + print "#! '"${soname}"'" + print "# '"${OBJECT_MODE}"'" + } + { + if ($4 == "EXP" || $4 == "ImpExp") { + print $8 + } else + if ($4 == "wEXP") { + print $8" weak" + } + }' <"${workdir}"/syms > "${workdir}"/${shri} || exit 1 +fi +${mv} "${output}" "${workdir}/${shro}" || exit 1 +${ar} rc "${output}" ${shri:+"${workdir}/${shri}"} "${workdir}/${shro}" || exit 1 +exit 0 diff --git a/sys-devel/native-cctools/files/aix-2/mkexpfile b/sys-devel/native-cctools/files/aix-2/mkexpfile new file mode 100644 index 000000000000..4e79e4647b06 --- /dev/null +++ b/sys-devel/native-cctools/files/aix-2/mkexpfile @@ -0,0 +1,70 @@ +#! /bin/sh + +nm="${0%mkexpfile}nm" +showwith= +expfile="ld.aix.exports.$$" +srcobjs= + +# /bin/sort does not allow TMPDIR to be longer than 85 characters +test ${#TMPDIR} -le 85 || TMPDIR=/tmp export TMPDIR + +while test $# -gt 0 +do + arg=$1 + shift + + case ${arg} in + --) for arg in "$@" + do + srcobjs="${srcobjs} '${arg}'" + done + break + ;; + --show-with=*) showwith="${arg#--show-with=}" ;; + -o) expfile="${1}"; shift ;; + -o*) expfile="${arg#-o}"; ;; + *) srcobjs="${srcobjs} '${arg}'" ;; + esac +done + +/bin/rm -f "${expfile}" || exit 1 + +if ! type "${nm}" >/dev/null 2>&1 +then + case ${nm} in + *-nm) nm=${nm##*/} ;; # use "powerpc-ibm-aix7.1.0.0-nm" from PATH + */nm|nm) nm=/usr/ccs/bin/nm ;; # native anyway + esac + type "${nm}" >/dev/null || exit 1 # let 'type' yell when necessary +fi + +if "${nm}" -V 2>&1 | /bin/grep 'GNU' >/dev/null +then + eval "${nm}" -Bpg ${srcobjs} | + /bin/awk '{ + if ((($2 == "T") || ($2 == "D") || ($2 == "B") || ($2 == "W")) && (substr($3,1,1) != ".")) { + if ($2 == "W") { + print $3 " weak" + } else { + print $3 + } + } + }' | + /bin/sort -u > "${expfile}" || exit 1 +else + eval "${nm}" -PCpgl ${srcobjs} | + /bin/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 + } + } + }' | + /bin/sort -u > "${expfile}" || exit 1 +fi + +echo "${showwith}${expfile}" + +exit 0 diff --git a/sys-devel/native-cctools/files/aix-2/nm b/sys-devel/native-cctools/files/aix-2/nm new file mode 100644 index 000000000000..5ba1d650d23a --- /dev/null +++ b/sys-devel/native-cctools/files/aix-2/nm @@ -0,0 +1,6 @@ +#! /bin/sh + +# /usr/bin/sort (used by nm) cannot work with TMPDIR longer than 85 characters. +test ${#TMPDIR} -le 85 || TMPDIR=/tmp export TMPDIR + +exec /usr/ccs/bin/nm ${1+"$@"} diff --git a/sys-devel/native-cctools/files/aix-mkexpfile-1 b/sys-devel/native-cctools/files/aix-mkexpfile-1 deleted file mode 100644 index 7b36f3bc1f7a..000000000000 --- a/sys-devel/native-cctools/files/aix-mkexpfile-1 +++ /dev/null @@ -1,56 +0,0 @@ -#! /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-4.ebuild index 0cb79b0c8e91..b950955536b8 100644 --- a/sys-devel/native-cctools/native-cctools-3.ebuild +++ b/sys-devel/native-cctools/native-cctools-4.ebuild @@ -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-devel/native-cctools/native-cctools-3.ebuild,v 1.1 2013/11/05 15:03:13 haubi Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-devel/native-cctools/native-cctools-4.ebuild,v 1.1 2013/11/08 14:19:30 haubi Exp $ EAPI="3" @@ -13,8 +13,7 @@ SRC_URI="" LICENSE="GPL-2" # actually, we don't know, the wrapper is SLOT="0" -AIX_LD_V=2 -AIX_MKEXPFILE_V=1 +AIX_V='aix-2' KEYWORDS="~ppc-aix ~x86-interix ~ppc-macos ~x64-macos ~x86-macos ~x64-solaris ~x86-solaris" @@ -39,8 +38,9 @@ src_install() { ;; *-aix*) nativepath=/usr/ccs/bin - wrappers=("${wrappers[@]}" "ld=${FILESDIR}/ld-aix-${AIX_LD_V}") - wrappers=("${wrappers[@]}" "mkexpfile=${FILESDIR}/aix-mkexpfile-${AIX_MKEXPFILE_V}") + wrappers=("${wrappers[@]}" "ld=${FILESDIR}/${AIX_V}/ld") + wrappers=("${wrappers[@]}" "nm=${FILESDIR}/${AIX_V}/nm") + wrappers=("${wrappers[@]}" "mkexpfile=${FILESDIR}/${AIX_V}/mkexpfile") ;; *-apple-darwin*|*-netbsd*|*-openbsd*) nativepath=/usr/bin @@ -92,6 +92,7 @@ src_install() { for wrapper in "${wrappers[@]}" ; do source=${wrapper#*=} target=${wrapper%%=*} + rm -f "${target}" newexe "${source}" "${target}" || die done # Generate an env.d entry for this binutils |