diff options
author | Sam James <sam@gentoo.org> | 2022-04-19 23:47:55 +0100 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-04-19 23:51:53 +0100 |
commit | 223dd4ea27d8c7c6ae62c8ad0052433020c1a57f (patch) | |
tree | 80e71f6e4824b4980b26c81c84607f7836deb5e0 /sys-devel/binutils-hppa64 | |
parent | sys-devel/binutils: consistent style in 9999 (diff) | |
download | gentoo-223dd4ea27d8c7c6ae62c8ad0052433020c1a57f.tar.gz gentoo-223dd4ea27d8c7c6ae62c8ad0052433020c1a57f.tar.bz2 gentoo-223dd4ea27d8c7c6ae62c8ad0052433020c1a57f.zip |
sys-devel/binutils-hppa64: consistent style for 2.38-r2; sync with binutils
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'sys-devel/binutils-hppa64')
-rw-r--r-- | sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild | 87 |
1 files changed, 47 insertions, 40 deletions
diff --git a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild index e0fca58818e6..eb08e66401b4 100644 --- a/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild +++ b/sys-devel/binutils-hppa64/binutils-hppa64-2.38-r2.ebuild @@ -5,10 +5,11 @@ EAPI=7 export CTARGET=hppa64-${CHOST#*-} -inherit libtool flag-o-matic gnuconfig multilib toolchain-funcs +inherit libtool flag-o-matic gnuconfig multilib strip-linguas toolchain-funcs DESCRIPTION="Tools necessary to build programs" HOMEPAGE="https://sourceware.org/binutils/" + LICENSE="GPL-3+" IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla" REQUIRED_USE="default-gold? ( gold )" @@ -116,13 +117,13 @@ src_prepare() { fi fi - # Make sure our explicit libdir paths don't get clobbered. #562460 + # Make sure our explicit libdir paths don't get clobbered, bug #562460 sed -i \ -e 's:@bfdlibdir@:@libdir@:g' \ -e 's:@bfdincludedir@:@includedir@:g' \ {bfd,opcodes}/Makefile.in || die - # Fix locale issues if possible #122216 + # Fix locale issues if possible, bug #122216 if [[ -e ${FILESDIR}/binutils-configure-LANG.patch ]] ; then einfo "Fixing misc issues in configure files" for f in $(find "${S}" -name configure -exec grep -l 'autoconf version 2.13' {} +) ; do @@ -133,11 +134,6 @@ src_prepare() { done fi - # Fix conflicts with newer glibc #272594 - if [[ -e libiberty/testsuite/test-demangle.c ]] ; then - sed -i 's:\<getline\>:get_line:g' libiberty/testsuite/test-demangle.c - fi - # Apply things from PATCHES and user dirs default @@ -167,7 +163,7 @@ src_configure() { BINPATH=${TOOLPATH}/binutils-bin/${PV} # Make sure we filter $LINGUAS so that only ones that - # actually work make it through #42033 + # actually work make it through, bug #42033 strip-linguas -u */po # Keep things sane @@ -204,9 +200,10 @@ src_configure() { myconf+=( --with-system-zlib ) - # For bi-arch systems, enable a 64bit bfd. This matches - # the bi-arch logic in toolchain.eclass. #446946 - # We used to do it for everyone, but it's slow on 32bit arches. #438522 + # For bi-arch systems, enable a 64bit bfd. This matches the bi-arch + # logic in toolchain.eclass. bug #446946 + # + # We used to do it for everyone, but it's slow on 32bit arches. bug #438522 case $(tc-arch) in ppc|sparc|x86) myconf+=( --enable-64-bit-bfd ) ;; esac @@ -220,10 +217,7 @@ src_configure() { --enable-poison-system-directories ) - # glibc-2.3.6 lacks support for this ... so rather than force glibc-2.5+ - # on everyone in alpha (for now), we'll just enable it when possible - has_version ">=${CATEGORY}/glibc-2.5" && myconf+=( --enable-secureplt ) - has_version ">=sys-libs/glibc-2.5" && myconf+=( --enable-secureplt ) + myconf+=( --enable-secureplt ) # mips can't do hash-style=gnu ... if [[ $(tc-arch) != mips ]] ; then @@ -247,24 +241,24 @@ src_configure() { --enable-threads # Newer versions (>=2.27) offer a configure flag now. --enable-relro - # Newer versions (>=2.24) make this an explicit option. #497268 + # Newer versions (>=2.24) make this an explicit option, bug #497268 --enable-install-libiberty # Available from 2.35 on --enable-textrel-check=warning - # Works better than vapier's patch... #808787 + # Works better than vapier's patch., bug #808787 --enable-new-dtags --disable-werror --with-bugurl="$(toolchain-binutils_bugurl)" --with-pkgversion="$(toolchain-binutils_pkgversion)" $(use_enable static-libs static) ${EXTRA_ECONF} - # Disable modules that are in a combined binutils/gdb tree. #490566 + # Disable modules that are in a combined binutils/gdb tree. bug #490566 --disable-{gdb,libdecnumber,readline,sim} # Strip out broken static link flags. # https://gcc.gnu.org/PR56750 --without-stage1-ldflags # Change SONAME to avoid conflict across - # {native,cross}/binutils, binutils-libs. #666100 + # {native,cross}/binutils, binutils-libs. bug #666100 --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st) # avoid automagic dependency on (currently prefix) systems @@ -276,12 +270,15 @@ src_configure() { # But the check does not quite work on i686: bug #760926. $(use_enable cet) - # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support. - $(use_enable pgo pgo-build) ) - if use pgo ; then - export BUILD_CFLAGS="${CFLAGS}" + if ! is_cross ; then + # No LTO for HPPA64 right now as we don't build kgcc64 with LTO support. + myconf+=( $(use_enable pgo pgo-build) ) + + if use pgo ; then + export BUILD_CFLAGS="${CFLAGS}" + fi fi echo ./configure "${myconf[@]}" @@ -296,7 +293,8 @@ src_configure() { } src_compile() { - cd "${MY_BUILDDIR}" + cd "${MY_BUILDDIR}" || die + # see Note [tooldir hack for ldscripts] emake tooldir="${EPREFIX}${TOOLPATH}" all @@ -313,7 +311,7 @@ src_compile() { src_test() { cd "${MY_BUILDDIR}" - # bug 637066 + # bug #637066 filter-flags -Wall -Wreturn-type emake -k check @@ -322,14 +320,15 @@ src_test() { src_install() { local x d - cd "${MY_BUILDDIR}" + cd "${MY_BUILDDIR}" || die + # see Note [tooldir hack for ldscripts] emake DESTDIR="${D}" tooldir="${EPREFIX}${LIBPATH}" install - rm -rf "${ED}"/${LIBPATH}/bin + rm -rf "${ED}"/${LIBPATH}/bin || die use static-libs || find "${ED}" -name '*.la' -delete - # Newer versions of binutils get fancy with ${LIBPATH} #171905 - cd "${ED}"/${LIBPATH} + # Newer versions of binutils get fancy with ${LIBPATH}, bug #171905 + cd "${ED}"/${LIBPATH} || die for d in ../* ; do [[ ${d} == ../${PV} ]] && continue mv ${d}/* . || die @@ -340,17 +339,18 @@ src_install() { # When something is built to cross-compile, it installs into # /usr/$CHOST/ by default ... we have to 'fix' that :) if is_cross ; then - cd "${ED}"/${BINPATH} + cd "${ED}"/${BINPATH} || die for x in * ; do - mv ${x} ${x/${CTARGET}-} + mv ${x} ${x/${CTARGET}-} || die done if [[ -d ${ED}/usr/${CHOST}/${CTARGET} ]] ; then - mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} - mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ - rm -r "${ED}"/usr/${CHOST}/{include,lib} + mv "${ED}"/usr/${CHOST}/${CTARGET}/include "${ED}"/${INCPATH} || die + mv "${ED}"/usr/${CHOST}/${CTARGET}/lib/* "${ED}"/${LIBPATH}/ || die + rm -r "${ED}"/usr/${CHOST}/{include,lib} || die fi fi + insinto ${INCPATH} local libiberty_headers=( # Not all the libiberty headers. See libiberty/Makefile.in:install_to_libdir. @@ -364,8 +364,8 @@ src_install() { ) doins "${libiberty_headers[@]/#/${S}/include/}" if [[ -d ${ED}/${LIBPATH}/lib ]] ; then - mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ - rm -r "${ED}"/${LIBPATH}/lib + mv "${ED}"/${LIBPATH}/lib/* "${ED}"/${LIBPATH}/ || die + rm -r "${ED}"/${LIBPATH}/lib || die fi # Generate an env.d entry for this binutils @@ -379,29 +379,36 @@ src_install() { # Handle documentation if ! is_cross ; then - cd "${S}" + cd "${S}" || die dodoc README + docinto bfd dodoc bfd/ChangeLog* bfd/README bfd/PORTING bfd/TODO + docinto binutils dodoc binutils/ChangeLog binutils/NEWS binutils/README + docinto gas dodoc gas/ChangeLog* gas/CONTRIBUTORS gas/NEWS gas/README* + docinto gprof dodoc gprof/ChangeLog* gprof/TEST gprof/TODO gprof/bbconv.pl + docinto ld dodoc ld/ChangeLog* ld/README ld/NEWS ld/TODO + docinto libiberty dodoc libiberty/ChangeLog* libiberty/README + docinto opcodes dodoc opcodes/ChangeLog* fi # Remove shared info pages - rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} + rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info} || die # Trim all empty dirs - find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null + find "${ED}" -depth -type d -exec rmdir {} + 2>/dev/null || die # the hppa64 hack; this should go into 9999 as a PN-conditional # tweak the default fake list a little bit |