From d1a6c9c36f3b2de1207271e154a8cbc408970cb5 Mon Sep 17 00:00:00 2001 From: Sayan Chowdhury Date: Tue, 27 Jul 2021 14:19:13 +0530 Subject: [PATCH] sys-libs/binutils-libs: Sync with Gentoo upstream; updates to 2.37 Signed-off-by: Sayan Chowdhury --- .../sys-libs/binutils-libs/Manifest | 4 +- .../binutils-libs/binutils-libs-2.35.2.ebuild | 2 +- .../binutils-libs-2.36.1-r2.ebuild | 134 ++++++++++++++++++ ...r1.ebuild => binutils-libs-2.37_p1.ebuild} | 9 +- .../files/binutils-libs-2.36.1-bfd-ctf.patch | 68 --------- .../files/binutils-libs-2.36.1-ld-ctf.patch | 48 ------- 6 files changed, 143 insertions(+), 122 deletions(-) create mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild rename sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/{binutils-libs-2.36.1-r1.ebuild => binutils-libs-2.37_p1.ebuild} (96%) delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/files/binutils-libs-2.36.1-bfd-ctf.patch delete mode 100644 sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/files/binutils-libs-2.36.1-ld-ctf.patch diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest index 96ce2c6257..ff13826946 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest +++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/Manifest @@ -2,5 +2,7 @@ DIST binutils-2.34-patches-6.tar.xz 103028 BLAKE2B d0e866d0941d2b550c7d7f23530c6 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d SHA512 2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd DIST binutils-2.35.2-patches-1.tar.xz 11836 BLAKE2B 0141349c9618992d1ab1e0309f7ed8fbc43b60a58be1dfed05eae8a8fee857241d9e112ae673da6fc9778767675f536ece818cb85567367bb1c8f87a0693623f SHA512 35de5f227c745c5fb800784fe657b2a6216faf43e2498e8481e7b0dc79b0d2f86b3b6a10b896e060319a77a51c61d2e1b7a951ae962b3a6ef8c1a2a261d9bb6c DIST binutils-2.35.2.tar.xz 22056908 BLAKE2B 9c392e0db2b482442f9476f30bd80cf2796321cbf7be79cf21af7bef167b6074c4ae009dcf9b438d2f2f4a23381c935176b2cfa85de1a526ab46e0fd844a7ca5 SHA512 9974ede5978d32e0d68fef23da48fa00bd06b0bff7ec45b00ca075c126d6bbe0cf2defc03ecc3f17bc6cc85b64271a13009c4049d7ba17de26e84e3a6e2c0348 -DIST binutils-2.36.1-patches-3.tar.xz 32720 BLAKE2B 2a5a60168ec5ff612e7e58530092f306460cdb4a963320978dffcc22d73684486a14a5981f6eab2f7fc270def22cdc9954de455d680b2de4befc1ad4916347ba SHA512 e429cc82451675f14715d4e7640fe7b995495c8759a8e919c4291f8ca8358a663012f05c1ec6e60b1261114848379fefc9df723929770462dd676fa04fc7aa54 +DIST binutils-2.36.1-patches-5.tar.xz 44388 BLAKE2B 1dadb012fe35ec5fb0c5a15d348ab535bc5e3765375c97a3768c6b9f7126e0fda15d35163c9f9c33a4be98662dd120d7c1b21930a20c18dbb5345f56ecd9ecc1 SHA512 a2ce3388f1f1a77ff865481ff4b625121fd55f5234fed0a885312744f2f9c504717de1499b68252c6de64fa45866db7692df91c5838b43fbeb178938811cbe84 DIST binutils-2.36.1.tar.xz 22772248 BLAKE2B 03fbfbedd6dba2beaa836b1ed254eddd7a54a163d3061fd93edd2b9591cae24ba049b26658c524b5ccecc2f22d431dfa168218d2531aa356945c994fbbe896fa SHA512 cc24590bcead10b90763386b6f96bb027d7594c659c2d95174a6352e8b98465a50ec3e4088d0da038428abe059bbc4ae5f37b269f31a40fc048072c8a234f4e9 +DIST binutils-2.37_p1-patches-0.tar.xz 1392 BLAKE2B 128930a381022fea5d1fcb0695953e8dada2513b088b8540fe08d4e0da93ec18b6bf9c78acad6ec5a8982ae2c115d143462ef0bb7bfd63cfeb06c10ad472c2f8 SHA512 44666821f96349e96685ffcfd53a80a94659e38fc63eeeb980d0eed13aab03ae3e2d5059b4932cd9018f2f7698cdb5e15b443d60c01b2bd1385eeb0c698e0e24 +DIST binutils-2.37_p1.tar.xz 22992196 BLAKE2B a8aa0f386d03a5b1466166ac7c40989c228351ccf0949a9b462b4d4615d70ab7e1a45351299140a42baf39c317b8007733c253eb547ee1dfadb612addde11621 SHA512 46c297ec2a7a5b81d1c6e3f16486a6dc2860a07520fe2dd8871d1eb5160065bbe2cc6b0415d5352bf12284133e5817a4e429e6077182d615e969bd1a8f52ed28 diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild index f10651d7aa..cf18b9ed65 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.35.2.ebuild @@ -21,7 +21,7 @@ SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz LICENSE="|| ( GPL-3 LGPL-3 )" SLOT="0/${PV}" IUSE="64-bit-bfd cet multitarget nls static-libs" -KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" +KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" BDEPEND="nls? ( sys-devel/gettext )" DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]" diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild new file mode 100644 index 0000000000..46715c3766 --- /dev/null +++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r2.ebuild @@ -0,0 +1,134 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PATCH_VER=5 +PATCH_DEV=dilfridge + +inherit libtool toolchain-funcs multilib-minimal + +MY_PN="binutils" +MY_P="${MY_PN}-${PV}" +PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} +PATCH_DEV=${PATCH_DEV:-slyfox} + +DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages" +HOMEPAGE="https://sourceware.org/binutils/" +SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" + +LICENSE="|| ( GPL-3 LGPL-3 )" +SLOT="0/${PV}" +IUSE="64-bit-bfd cet multitarget nls static-libs" +KEYWORDS="~alpha amd64 arm arm64 ~hppa ~ia64 ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" + +BDEPEND="nls? ( sys-devel/gettext )" +DEPEND="sys-libs/zlib[${MULTILIB_USEDEP}]" +# Need a newer binutils-config that'll reset include/lib symlinks for us. +RDEPEND="${DEPEND} + >=sys-devel/binutils-config-5 +" + +S="${WORKDIR}/${MY_P}" + +MULTILIB_WRAPPED_HEADERS=( + /usr/include/bfd.h +) + +src_prepare() { + if [[ ! -z ${PATCH_VER} ]] ; then + einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset ${PATCH_VER}" + eapply "${WORKDIR}/patch"/*.patch + fi + + # Fix cross-compile relinking issue, bug #626402 + elibtoolize + + default +} + +pkgversion() { + printf "Gentoo ${PVR}" + [[ -n ${PATCHVER} ]] && printf " p${PATCHVER}" +} + +multilib_src_configure() { + local myconf=( + --enable-obsolete + --enable-shared + --enable-threads + # Newer versions (>=2.24) make this an explicit option. #497268 + --enable-install-libiberty + --disable-werror + --with-bugurl="https://bugs.gentoo.org/" + --with-pkgversion="$(pkgversion)" + $(use_enable static-libs static) + # The binutils eclass enables this flag for all bi-arch builds, + # but other tools often don't care about that support. Put it + # beyond a flag if people really want it, but otherwise leave + # it disabled as it can slow things down on 32bit arches. #438522 + $(use_enable 64-bit-bfd) + # This only disables building in the zlib subdir. + # For binutils itself, it'll use the system version. #591516 + --without-zlib + --with-system-zlib + # We only care about the libs, so disable programs. #528088 + --disable-{binutils,etc,ld,gas,gold,gprof} + # Disable modules that are in a combined binutils/gdb tree. #490566 + --disable-{gdb,libdecnumber,readline,sim} + # Strip out broken static link flags. + # https://gcc.gnu.org/PR56750 + --without-stage1-ldflags + # We pull in all USE-flags that change ABI in an incompatible + # way. #666100 + # USE=multitarget change size of global arrays + # USE=64-bit-bfd changes data structures of exported API + --with-extra-soversion-suffix=gentoo-${CATEGORY}-${PN}-$(usex multitarget mt st)-$(usex 64-bit-bfd 64 def) + + # avoid automagic dependency on (currently prefix) systems + # systems with debuginfod library, bug #754753 + --without-debuginfod + + # Allow user to opt into CET for host libraries. + # Ideally we would like automagic-or-disabled here. + # But the check does not quite work on i686: bug #760926. + $(use_enable cet) + ) + + # mips can't do hash-style=gnu ... + if [[ $(tc-arch) != mips ]] ; then + myconf+=( --enable-default-hash-style=gnu ) + fi + + use multitarget && myconf+=( --enable-targets=all --enable-64-bit-bfd ) + + use nls \ + && myconf+=( --without-included-gettext ) \ + || myconf+=( --disable-nls ) + + if [[ ${CHOST} == *-darwin* ]] && use nls ; then + # fix underlinking in opcodes + sed -i -e 's/@SHARED_LDFLAGS@/@SHARED_LDFLAGS@ -lintl/' \ + "${S}"/opcodes/Makefile.in || die + fi + + ECONF_SOURCE=${S} \ + econf "${myconf[@]}" + + # Prevent makeinfo from running as we don't build docs here. + # bug #622652 + sed -i \ + -e '/^MAKEINFO/s:=.*:= true:' \ + Makefile || die +} + +multilib_src_install() { + default + # Provide libiberty.h directly. + dosym libiberty/libiberty.h /usr/include/libiberty.h +} + +multilib_src_install_all() { + use static-libs || find "${ED}"/usr -name '*.la' -delete +} diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r1.ebuild b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.37_p1.ebuild similarity index 96% rename from sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r1.ebuild rename to sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.37_p1.ebuild index 60e0e7e544..bfff1b5055 100644 --- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.36.1-r1.ebuild +++ b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/binutils-libs-2.37_p1.ebuild @@ -3,7 +3,7 @@ EAPI=7 -PATCH_VER=3 +PATCH_VER=0 PATCH_DEV=dilfridge inherit libtool toolchain-funcs multilib-minimal @@ -11,15 +11,16 @@ inherit libtool toolchain-funcs multilib-minimal MY_PN="binutils" MY_P="${MY_PN}-${PV}" PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}} -PATCH_DEV=${PATCH_DEV:-slyfox} +PATCH_DEV=${PATCH_DEV:-dilfridge} DESCRIPTION="Core binutils libraries (libbfd, libopcodes, libiberty) for external packages" HOMEPAGE="https://sourceware.org/binutils/" SRC_URI="mirror://gnu/binutils/${MY_P}.tar.xz + https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_P}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/${MY_PN}-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz" LICENSE="|| ( GPL-3 LGPL-3 )" -SLOT="0/${PV}" +SLOT="0/${PV%_p?}" IUSE="64-bit-bfd cet multitarget nls static-libs" KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86 ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris" @@ -30,7 +31,7 @@ RDEPEND="${DEPEND} >=sys-devel/binutils-config-5 " -S="${WORKDIR}/${MY_P}" +S="${WORKDIR}/${MY_P%_p?}" MULTILIB_WRAPPED_HEADERS=( /usr/include/bfd.h diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/files/binutils-libs-2.36.1-bfd-ctf.patch b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/files/binutils-libs-2.36.1-bfd-ctf.patch deleted file mode 100644 index d7daf68366..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/files/binutils-libs-2.36.1-bfd-ctf.patch +++ /dev/null @@ -1,68 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=755ba58ebef02e1be9fc6770d00243ba6ed0223c -https://bugs.gentoo.org/783777 - -From 755ba58ebef02e1be9fc6770d00243ba6ed0223c Mon Sep 17 00:00:00 2001 -From: Nick Alcock -Date: Thu, 18 Mar 2021 12:37:52 +0000 -Subject: [PATCH] Add install dependencies for ld -> bfd and libctf -> bfd - -This stops problems parallel-installing if a relink of libctf is needed. - -Also adds corresponding install-strip dependencies. - -ChangeLog -2021-03-18 Nick Alcock - - PR libctf/27482 - * Makefile.def: Add install-bfd dependencies for install-libctf and - install-ld, and install-strip-bfd dependencies for - install-strip-libctf and install-strip-ld; move the install-ld - dependency on install-libctf to join it. - * Makefile.in: Regenerated. ---- ---- a/Makefile.def -+++ b/Makefile.def -@@ -448,7 +448,6 @@ dependencies = { module=all-binutils; on=all-intl; }; - dependencies = { module=all-binutils; on=all-gas; }; - dependencies = { module=all-binutils; on=all-libctf; }; - dependencies = { module=all-ld; on=all-libctf; }; --dependencies = { module=install-ld; on=install-libctf; }; - - // We put install-opcodes before install-binutils because the installed - // binutils might be on PATH, and they might need the shared opcodes -@@ -456,6 +455,14 @@ dependencies = { module=install-ld; on=install-libctf; }; - dependencies = { module=install-binutils; on=install-opcodes; }; - dependencies = { module=install-strip-binutils; on=install-strip-opcodes; }; - -+// Likewise for ld, libctf, and bfd. -+dependencies = { module=install-libctf; on=install-bfd; }; -+dependencies = { module=install-ld; on=install-bfd; }; -+dependencies = { module=install-ld; on=install-libctf; }; -+dependencies = { module=install-strip-libctf; on=install-strip-bfd; }; -+dependencies = { module=install-strip-ld; on=install-strip-bfd; }; -+dependencies = { module=install-strip-ld; on=install-strip-libctf; }; -+ - // libopcodes depends on libbfd - dependencies = { module=install-opcodes; on=install-bfd; }; - dependencies = { module=install-strip-opcodes; on=install-strip-bfd; }; ---- a/Makefile.in -+++ b/Makefile.in -@@ -52170,9 +52170,14 @@ all-stage3-ld: maybe-all-stage3-libctf - all-stage4-ld: maybe-all-stage4-libctf - all-stageprofile-ld: maybe-all-stageprofile-libctf - all-stagefeedback-ld: maybe-all-stagefeedback-libctf --install-ld: maybe-install-libctf - install-binutils: maybe-install-opcodes - install-strip-binutils: maybe-install-strip-opcodes -+install-libctf: maybe-install-bfd -+install-ld: maybe-install-bfd -+install-ld: maybe-install-libctf -+install-strip-libctf: maybe-install-strip-bfd -+install-strip-ld: maybe-install-strip-bfd -+install-strip-ld: maybe-install-strip-libctf - install-opcodes: maybe-install-bfd - install-strip-opcodes: maybe-install-strip-bfd - configure-gas: maybe-configure-intl --- -2.27.0 - diff --git a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/files/binutils-libs-2.36.1-ld-ctf.patch b/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/files/binutils-libs-2.36.1-ld-ctf.patch deleted file mode 100644 index 012df3aed8..0000000000 --- a/sdk_container/src/third_party/portage-stable/sys-libs/binutils-libs/files/binutils-libs-2.36.1-ld-ctf.patch +++ /dev/null @@ -1,48 +0,0 @@ -https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=f04ce15e831b691d7610dba284e266919e757b10 -https://bugs.gentoo.org/783777 - -From f04ce15e831b691d7610dba284e266919e757b10 Mon Sep 17 00:00:00 2001 -From: Nick Alcock -Date: Tue, 26 Jan 2021 16:05:17 +0000 -Subject: [PATCH] ld: depend on libctf - -Since ld may depend on libctf (if present), and libctf may be relinked -by the installation process, libctf must be installed before ld is, -or the relink may fail if it calls on symbols or symbol versions that do -not exist in any libctf already present on the system. (If none is -present, the copy in the build tree will be automatically used, but -if one *is* present, it may take precedence and break things.) - -(This is a maybe- dependency, so it will work even if libctf is -disabled.) - -ChangeLog -2021-01-26 Nick Alcock - - PR 27250 - * Makefile.def: Add install-libctf dependency to install-ld. - * Makefile.in: Regenerated. ---- ---- a/Makefile.def -+++ b/Makefile.def -@@ -448,6 +448,7 @@ dependencies = { module=all-binutils; on=all-intl; }; - dependencies = { module=all-binutils; on=all-gas; }; - dependencies = { module=all-binutils; on=all-libctf; }; - dependencies = { module=all-ld; on=all-libctf; }; -+dependencies = { module=install-ld; on=install-libctf; }; - - // We put install-opcodes before install-binutils because the installed - // binutils might be on PATH, and they might need the shared opcodes ---- a/Makefile.in -+++ b/Makefile.in -@@ -52170,6 +52170,7 @@ all-stage3-ld: maybe-all-stage3-libctf - all-stage4-ld: maybe-all-stage4-libctf - all-stageprofile-ld: maybe-all-stageprofile-libctf - all-stagefeedback-ld: maybe-all-stagefeedback-libctf -+install-ld: maybe-install-libctf - install-binutils: maybe-install-opcodes - install-strip-binutils: maybe-install-strip-opcodes - install-opcodes: maybe-install-bfd --- -2.27.0 -