[gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2024-03-23 Thread Sam James
commit: 86dc000bf5d16a3769d5e5accb08819404b20201
Author: Sam James  gentoo  org>
AuthorDate: Sat Mar 23 15:59:55 2024 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Mar 23 15:59:55 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86dc000b

sys-devel/binutils: drop stale autoconf 2.13 handling

See 010b4be4c695d267514d7c8ea65590f22a4cf133.

Signed-off-by: Sam James  gentoo.org>

 sys-devel/binutils/binutils-2.32-r2.ebuild | 11 
 sys-devel/binutils/binutils-2.33.1-r1.ebuild   | 11 
 sys-devel/binutils/binutils-2.34-r2.ebuild | 11 
 sys-devel/binutils/binutils-2.35.2.ebuild  | 11 
 sys-devel/binutils/binutils-2.36.1-r2.ebuild   | 11 
 sys-devel/binutils/binutils-2.37_p1-r2.ebuild  | 11 
 sys-devel/binutils/binutils-2.38-r2.ebuild | 11 
 sys-devel/binutils/binutils-2.39-r5.ebuild | 11 
 sys-devel/binutils/binutils-2.40-r9.ebuild | 11 
 sys-devel/binutils/binutils-2.41-r2.ebuild | 11 
 sys-devel/binutils/binutils-2.41-r3.ebuild | 11 
 sys-devel/binutils/binutils-2.41-r4.ebuild | 11 
 sys-devel/binutils/binutils-2.41-r5.ebuild | 11 
 sys-devel/binutils/binutils-2.42-r1.ebuild | 11 
 sys-devel/binutils/binutils-.ebuild| 11 
 .../binutils/files/binutils-configure-LANG.patch   | 65 --
 16 files changed, 230 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.32-r2.ebuild 
b/sys-devel/binutils/binutils-2.32-r2.ebuild
index 1603eecf56a5..606d5951eec2 100644
--- a/sys-devel/binutils/binutils-2.32-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.32-r2.ebuild
@@ -111,17 +111,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
 
-   # Fix locale issues if possible #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
-   ebegin "  Updating ${f/${S}\/}"
-   patch "${f}" 
"${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-   || eerror "Please file a bug about this"
-   eend $?
-   done
-   fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\:get_line:g' 
libiberty/testsuite/test-demangle.c

diff --git a/sys-devel/binutils/binutils-2.33.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
index 1407f814db9d..29def533ca06 100644
--- a/sys-devel/binutils/binutils-2.33.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
@@ -104,17 +104,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
 
-   # Fix locale issues if possible #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
-   ebegin "  Updating ${f/${S}\/}"
-   patch "${f}" 
"${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-   || eerror "Please file a bug about this"
-   eend $?
-   done
-   fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\:get_line:g' 
libiberty/testsuite/test-demangle.c

diff --git a/sys-devel/binutils/binutils-2.34-r2.ebuild 
b/sys-devel/binutils/binutils-2.34-r2.ebuild
index c4bd1379ccef..009154a560d0 100644
--- a/sys-devel/binutils/binutils-2.34-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.34-r2.ebuild
@@ -101,17 +101,6 @@ src_prepare() {
-e 's:@bfdincludedir@:@includedir@:g' \
{bfd,opcodes}/Makefile.in || die
 
-   # Fix locale issues if possible #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
-   ebegin "  Updating ${f/${S}\/}"
-   patch "${f}" 
"${FILESDIR}"/binutils-configure-LANG.patch >& "${T}"/configure-patch.log \
-   || eerror "Please file a bug about this"
-   eend $?
-   done
-   fi
-
# Fix conflicts with newer glibc #272594
if [[ -e libiberty/testsuite/test-demangle.c ]] ; then
sed -i 's:\:get_line:g' 
libiberty/testsuite/test-demangle.c

diff --git a/sys

[gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2023-02-22 Thread Sam James
commit: 07d598347c2a311c91eacd4303e0517cf0a127c3
Author: Sam James  gentoo  org>
AuthorDate: Wed Feb 22 22:22:46 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Wed Feb 22 22:26:22 2023 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=07d59834

sys-devel/binutils: apply linker search path fixes from Chewi for prefix

Quoting Chewi on the PR for posterity:
"""
The first of these changes fixes two related issues with prefixed and crossdev 
environments.
The prefix issue is detailed in Gentoo bug #892549. The crossdev issue can be 
reproduced by trying something like:

USE="-python icu" aarch64-unknown-linux-gnu-emerge libxml2

The second of these changes is not essential, but it does make bfd's behaviour
in this area more consistent with the other linkers, which have not experienced 
these issues at all.

I'm not sure what upstream will make of these changes, particularly the second 
one,
but it is interesting that even gold does not behave the same way as bfd here.

Perhaps we can give them some exposure in Gentoo for a while before seeing what 
they think.
The second change would not be submitted upstream as-is because fully removing 
the ld.so.conf feature is a much bigger diff.
"""

This patch is, for now, only applied for prefix. It should be safe
on other systems but the issue is more pressing on prefix given a recent
migration.

Bug: https://bugs.gentoo.org/892549
Thanks-to: James Le Cuirot  gentoo.org>
Signed-off-by: Sam James  gentoo.org>

 ...inutils-.ebuild => binutils-2.40-r2.ebuild} | 12 ++--
 sys-devel/binutils/binutils-.ebuild| 12 ++--
 .../files/binutils-2.40-linker-search-path.patch   | 74 ++
 3 files changed, 88 insertions(+), 10 deletions(-)

diff --git a/sys-devel/binutils/binutils-.ebuild 
b/sys-devel/binutils/binutils-2.40-r2.ebuild
similarity index 96%
copy from sys-devel/binutils/binutils-.ebuild
copy to sys-devel/binutils/binutils-2.40-r2.ebuild
index c8e0d5f94944..d8c2553ece20 100644
--- a/sys-devel/binutils/binutils-.ebuild
+++ b/sys-devel/binutils/binutils-2.40-r2.ebuild
@@ -19,7 +19,7 @@ IUSE="cet doc gold gprofng multitarget +nls pgo +plugins 
static-libs test vanill
 # PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
 #  for the patchsets
 
-PATCH_VER=0
+PATCH_VER=2
 PATCH_DEV=dilfridge
 
 if [[ ${PV} == * ]]; then
@@ -28,11 +28,11 @@ if [[ ${PV} == * ]]; then
 else
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
PATCH_DEV=${PATCH_DEV:-dilfridge}
-   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz 
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz";
+   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz 
https://sourceware.org/pub/binutils/releases/binutils-${PV}.tar.xz 
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz";
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}

https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz";
SLOT=$(ver_cut 1-2)
-   #KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips 
~ppc ~ppc64 ~riscv ~s390 ~sparc ~x86"
+   KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~loong ~m68k ~mips ~ppc 
~ppc64 ~riscv ~s390 ~sparc ~x86"
 fi
 
 #
@@ -112,6 +112,10 @@ src_prepare() {
einfo "Applying binutils patchset ${patchsetname}"
eapply "${WORKDIR}/patch"
einfo "Done."
+
+   # This is applied conditionally for now just out of 
caution.
+   # It should be okay on non-prefix systems though. See 
bug #892549.
+   use prefix && eapply 
"${FILESDIR}"/binutils-2.40-linker-search-path.patch
fi
fi
 
@@ -181,8 +185,6 @@ src_configure() {
append-ldflags -Wl,--undefined-version
fi
 
-   use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
-
local x
echo
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do

diff --git a/sys-devel/binutils/binutils-.ebuild 
b/sys-devel/binutils/binutils-.ebuild
index c8e0d5f94944..d8c2553ece20 100644
--- a/sys-devel/binutils/binutils-.ebuild
+++ b/sys-devel/binutils/binutils-.ebuild
@@ -19,7 +19,7 @@ IUSE="cet doc gold gprofng multitarget +nls pgo +plugins 
static-libs test vanill
 # PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
 #  for the patchsets
 
-PATCH_VER=0
+PATCH_VER=2
 PATCH_DEV=dilfridge
 
 if [[ ${PV} == * ]]; then
@@ -28,11 +28,11 @@ if [[ ${PV} == * ]]; then
 else
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
PATCH_DEV=${PATCH_DEV:-dilfridge}
-   SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz 
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz";
+   SRC_

[gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2022-08-10 Thread Maciej Barć
commit: cc08c0c4268af7240a3d463cab35e2e2fca06091
Author: Maciej Barć  gentoo  org>
AuthorDate: Wed Aug 10 14:50:12 2022 +
Commit: Maciej Barć  gentoo  org>
CommitDate: Wed Aug 10 14:58:39 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cc08c0c4

sys-devel/binutils: add the "emacs" USE flag

Closes: https://bugs.gentoo.org/841011
Acked-by: Sam James  gentoo.org>
Signed-off-by: Maciej Barć  gentoo.org>

 sys-devel/binutils/binutils-2.38-r2.ebuild| 16 ++--
 sys-devel/binutils/binutils-2.39.ebuild   | 16 ++--
 sys-devel/binutils/binutils-.ebuild   | 16 ++--
 sys-devel/binutils/files/50binutils-gentoo.el |  3 +++
 4 files changed, 45 insertions(+), 6 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.38-r2.ebuild 
b/sys-devel/binutils/binutils-2.38-r2.ebuild
index 47b5e977cdfd..71cc495774c1 100644
--- a/sys-devel/binutils/binutils-2.38-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.38-r2.ebuild
@@ -3,12 +3,12 @@
 
 EAPI=7
 
-inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+inherit elisp-common libtool flag-o-matic gnuconfig 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"
+IUSE="cet default-gold doc emacs +gold multitarget +nls pgo +plugins 
static-libs test vanilla"
 REQUIRED_USE="default-gold? ( gold )"
 
 # Variables that can be set here  (ignored for live ebuilds)
@@ -52,6 +52,7 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
 RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
+   emacs? ( >=app-editors/emacs-23.1:* )
 "
 DEPEND="${RDEPEND}"
 BDEPEND="
@@ -311,6 +312,8 @@ src_compile() {
emake V=1 info
fi
 
+   use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
+
# we nuke the manpages when we're left with junk
# (like when we bootstrap, no perl -> no manpages)
find . -name '*.1' -a -size 0 -delete
@@ -403,6 +406,11 @@ src_install() {
dodoc opcodes/ChangeLog*
fi
 
+   if use emacs ; then
+   elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
+   elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+   fi
+
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
 
@@ -414,6 +422,8 @@ pkg_postinst() {
# Make sure this ${CTARGET} has a binutils version selected
[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
binutils-config ${CTARGET}-${PV}
+
+   use emacs && elisp-site-regen
 }
 
 pkg_postrm() {
@@ -437,6 +447,8 @@ pkg_postrm() {
elif [[ $(CHOST=${CTARGET} binutils-config -c) == ${CTARGET}-${PV} ]] ; 
then
binutils-config ${CTARGET}-${PV}
fi
+
+   use emacs && elisp-site-regen
 }
 
 # Note [slotting support]

diff --git a/sys-devel/binutils/binutils-2.39.ebuild 
b/sys-devel/binutils/binutils-2.39.ebuild
index 3b954f859b3a..3cc9c5cdcc87 100644
--- a/sys-devel/binutils/binutils-2.39.ebuild
+++ b/sys-devel/binutils/binutils-2.39.ebuild
@@ -3,12 +3,12 @@
 
 EAPI=7
 
-inherit libtool flag-o-matic gnuconfig strip-linguas toolchain-funcs
+inherit elisp-common libtool flag-o-matic gnuconfig 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"
+IUSE="cet default-gold doc emacs gold multitarget +nls pgo +plugins 
static-libs test vanilla"
 REQUIRED_USE="default-gold? ( gold )"
 
 # Variables that can be set here  (ignored for live ebuilds)
@@ -54,6 +54,7 @@ is_cross() { [[ ${CHOST} != ${CTARGET} ]] ; }
 RDEPEND="
>=sys-devel/binutils-config-3
sys-libs/zlib
+   emacs? ( >=app-editors/emacs-23.1:* )
 "
 DEPEND="${RDEPEND}"
 BDEPEND="
@@ -316,6 +317,8 @@ src_compile() {
emake V=1 info
fi
 
+   use emacs && elisp-compile "${S}"/binutils/dwarf-mode.el
+
# we nuke the manpages when we're left with junk
# (like when we bootstrap, no perl -> no manpages)
find . -name '*.1' -a -size 0 -delete
@@ -417,6 +420,11 @@ src_install() {
dodoc opcodes/ChangeLog*
fi
 
+   if use emacs ; then
+   elisp-install ${PN} "${S}"/binutils/dwarf-mode.el{,c}
+   elisp-site-file-install "${FILESDIR}/50${PN}-gentoo.el"
+   fi
+
# Remove shared info pages
rm -f "${ED}"/${DATAPATH}/info/{dir,configure.info,standards.info}
 
@@ -428,6 +436,8 @@ pkg_postinst() {
# Make sure this ${CTARGET} has a binutils version selected
[[ -e ${EROOT}/etc/env.d/binutils/config-${CTARGET} ]] && return 0
binutils-config ${CTARGET}-${PV}
+
+   

[gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2021-02-26 Thread Sergei Trofimovich
commit: c4e8d909d36eae58cc8aa9e69259179d666b1458
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Feb 26 07:56:43 2021 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Feb 26 08:04:37 2021 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c4e8d909

sys-devel/binutils: fix 'cet' detection on i586

Reported-by: Worx
Bug: https://bugs.gentoo.org/771765
Package-Manager: Portage-3.0.15, Repoman-3.0.2
Signed-off-by: Sergei Trofimovich  gentoo.org>

 sys-devel/binutils/binutils-2.35.1-r1.ebuild   |   2 +
 sys-devel/binutils/binutils-2.35.2.ebuild  |   2 +
 sys-devel/binutils/binutils-2.36.1.ebuild  |   2 +
 sys-devel/binutils/files/binutils-2.35.1-cet.patch | 103 +
 4 files changed, 109 insertions(+)

diff --git a/sys-devel/binutils/binutils-2.35.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.35.1-r1.ebuild
index feee11a5ded..18c80a28f88 100644
--- a/sys-devel/binutils/binutils-2.35.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.35.1-r1.ebuild
@@ -68,6 +68,8 @@ BDEPEND="
 
 RESTRICT="!test? ( test )"
 
+PATCHES=("${FILESDIR}"/${PN}-2.35.1-cet.patch)
+
 MY_BUILDDIR=${WORKDIR}/build
 
 src_unpack() {

diff --git a/sys-devel/binutils/binutils-2.35.2.ebuild 
b/sys-devel/binutils/binutils-2.35.2.ebuild
index 2aff2770014..215e42f2c73 100644
--- a/sys-devel/binutils/binutils-2.35.2.ebuild
+++ b/sys-devel/binutils/binutils-2.35.2.ebuild
@@ -67,6 +67,8 @@ BDEPEND="
 
 RESTRICT="!test? ( test )"
 
+PATCHES=("${FILESDIR}"/${PN}-2.35.1-cet.patch)
+
 MY_BUILDDIR=${WORKDIR}/build
 
 src_unpack() {

diff --git a/sys-devel/binutils/binutils-2.36.1.ebuild 
b/sys-devel/binutils/binutils-2.36.1.ebuild
index 3d820fcc6f8..95875f24d78 100644
--- a/sys-devel/binutils/binutils-2.36.1.ebuild
+++ b/sys-devel/binutils/binutils-2.36.1.ebuild
@@ -67,6 +67,8 @@ BDEPEND="
 
 RESTRICT="!test? ( test )"
 
+PATCHES=("${FILESDIR}"/${PN}-2.35.1-cet.patch)
+
 MY_BUILDDIR=${WORKDIR}/build
 
 src_unpack() {

diff --git a/sys-devel/binutils/files/binutils-2.35.1-cet.patch 
b/sys-devel/binutils/files/binutils-2.35.1-cet.patch
new file mode 100644
index 000..7477ff90ac9
--- /dev/null
+++ b/sys-devel/binutils/files/binutils-2.35.1-cet.patch
@@ -0,0 +1,103 @@
+https://bugs.gentoo.org/771765
+https://sourceware.org/PR27397
+
+On i586-like CPUs endbr32 added by -Wl,-z,ibt,-z,shstk
+generates crashing binaries and causes ./configure failure.
+
+From 847e4b3207f97762dc641db8d3b188081c3370c3 Mon Sep 17 00:00:00 2001
+From: "H.J. Lu" 
+Date: Fri, 12 Feb 2021 16:30:23 -0800
+Subject: [PATCH] GCC_CET_HOST_FLAGS: Check if host supports multi-byte NOPs
+
+---
+ config/cet.m4   | 19 ---
+ libiberty/configure | 29 +
+ 2 files changed, 45 insertions(+), 3 deletions(-)
+
+diff --git a/config/cet.m4 b/config/cet.m4
+index c67fb4f35b6..7718be1afe8 100644
+--- a/config/cet.m4
 b/config/cet.m4
+@@ -130,6 +130,18 @@ fi
+ if test x$may_have_cet = xyes; then
+   if test x$cross_compiling = xno; then
+ AC_TRY_RUN([
++int
++main ()
++{
++  asm ("endbr32");
++  return 0;
++}
++],
++[have_multi_byte_nop=yes],
++[have_multi_byte_nop=no])
++have_cet=no
++if test x$have_multi_byte_nop = xyes; then
++  AC_TRY_RUN([
+ static void
+ foo (void)
+ {
+@@ -155,9 +167,10 @@ main ()
+   bar ();
+   return 0;
+ }
+-],
+-[have_cet=no],
+-[have_cet=yes])
++  ],
++  [have_cet=no],
++  [have_cet=yes])
++fi
+ if test x$enable_cet = xno -a x$have_cet = xyes; then
+   AC_MSG_ERROR([Intel CET must be enabled on Intel CET enabled host])
+ fi
+diff --git a/libiberty/configure b/libiberty/configure
+index 160b8c9e8b1..29a690d44fc 100755
+--- a/libiberty/configure
 b/libiberty/configure
+@@ -5539,6 +5539,34 @@ else
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
++int
++main ()
++{
++  asm ("endbr32");
++  return 0;
++}
++
++_ACEOF
++if ac_fn_c_try_run "$LINENO"; then :
++  have_multi_byte_nop=yes
++else
++  have_multi_byte_nop=no
++fi
++rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
++  conftest.$ac_objext conftest.beam conftest.$ac_ext
++fi
++
++have_cet=no
++if test x$have_multi_byte_nop = xyes; then
++  if test "$cross_compiling" = yes; then :
++  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
++$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
++as_fn_error $? "cannot run test program while cross compiling
++See \`config.log' for more details" "$LINENO" 5; }
++else
++  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
++/* end confdefs.h.  */
++
+ static void
+ foo (void)
+ {
+@@ -5575,6 +5603,7 @@ rm -f core *.core core.conftest.* gmon.out bb.out 
conftest$ac_exeext \
+   conftest.$ac_objext conftest.beam conftest.$ac_ext
+ fi
+ 
++fi
+ if test x$enable_cet = xno -a x$have_cet = xyes; then
+   as_fn_error $? "Intel CET must be enabled on Intel CET enabled host" 
"$LINENO" 5
+ fi
+-- 
+

[gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2020-07-25 Thread Andreas K. Hüttel
commit: 8a9654cf65cc7f92afccf1d4b2360f3bd7c397ca
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Sat Jul 25 11:31:34 2020 +
Commit: Andreas K. Hüttel  gentoo  org>
CommitDate: Sat Jul 25 11:31:58 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8a9654cf

sys-devel/binutils: Move patches into patchset

Package-Manager: Portage-2.3.103, Repoman-2.3.23
Signed-off-by: Andreas K. Hüttel  gentoo.org>

 sys-devel/binutils/Manifest|  2 +-
 sys-devel/binutils/binutils-2.34-r1.ebuild |  7 +---
 .../binutils/files/binutils-2.34-riscv-SEGV.patch  | 40 --
 3 files changed, 2 insertions(+), 47 deletions(-)

diff --git a/sys-devel/binutils/Manifest b/sys-devel/binutils/Manifest
index 9e9e3a861e0..624df839037 100644
--- a/sys-devel/binutils/Manifest
+++ b/sys-devel/binutils/Manifest
@@ -3,6 +3,6 @@ DIST binutils-2.32-patches-3.tar.xz 151372 BLAKE2B 
70d5f78d9f3e3bf9ff096b6f24bab
 DIST binutils-2.32.tar.xz 20774880 BLAKE2B 
d1bdbd9c8487c091665c197974ce4bdf520b7a67ed6997a81b87e6a0af9514a091458244f583acec5ae580ac2ee5e908f67f483b8e5263cd18ced794cb235da6
 SHA512 
d326408f12a03d9a61a9de56584c2af12f81c2e50d2d7e835d51565df8314df01575724afa1e43bd0db45cfc9916b41519b67dfce03232aa4978704492a6994a
 DIST binutils-2.33.1-patches-2.tar.xz 18636 BLAKE2B 
0e0757329b6a83aeff4f4c450c95e73fd48fcc89f83e63f294568632bee0972552cf2f57494352c5d9a7c16a51cdbc4108b38fa6028d4388c8e76046b3da9212
 SHA512 
d982f68d1f5fdb384309a2a1b7426bf840a90e7a85b37229b4223b62c36cab9dd9ec0c08382c85c68adf996dec21133df3180a2fc649363adae8645f8282f71d
 DIST binutils-2.33.1.tar.xz 21490848 BLAKE2B 
c336a8412938dc8c224f40a763a8bea9937cca0462a8fb80e62f14aabe590107fc061a3f4b9327e1f4652cb026384d36a91b4766d4d469d2d0680932874b638c
 SHA512 
b7a6767c6c7ca6b5cafa7080e6820b7bb3a53b7148348c438d99905defbdf0d30c9744a484ee01c9441a8153901808513366b15ba9533e20c9673c262ade36ac
-DIST binutils-2.34-patches-4.tar.xz 95232 BLAKE2B 
0a355120ecaf447d863f6d0837028061968166c9024da36212ce7d172ee2060e4027be1fca0089e38ab9073b5332307ff1dc05b868603bd2aa0ec8e88af7cd0a
 SHA512 
e593edbeddaf97ef23fa8eb25c5714c7f2dd2500d11422bd9dba42e119884fe71593adc98862f74c7d391ceb298556ed049eee3c504733c634faef236045876b
+DIST binutils-2.34-patches-5.tar.xz 96256 BLAKE2B 
3bf83ff3217e993de70697f5c8ead2da35482f4800fa1f3fafb3957a3ab68532ec78e00490263be1850914dc0c18657c94527eb8738a7a9c321b147ac8b9
 SHA512 
e10f07c677abd17063e1bac440e86240323d9ec32a493600f4400c9401709bec05a8fc8877dc7d8705a8416d72c2d2b1f5e5c069876f7cffa743b494a01e
 DIST binutils-2.34.tar.xz 21637796 BLAKE2B 
07dd23916a7d27f71c3f160c8c16abe2bd4fce294c738c665a012a3be6a87dbe8160d0c38740524f9025e01d438e99b2a94bcf9f9f79ee214f5dd033de8aad3d
 SHA512 
2c7976939dcf5e8c5b7374cccd39bfe803b1bec73c6abfa0eb17c24e1942574c6bdb874c66a092a82adc443182eacd8a5a8001c19a76101f0c7ba40c27de0bbd
 DIST binutils--patches-5.tar.xz 17492 BLAKE2B 
4d5072d26d714dbc2a65899102c35791887b3c1298eb40a72088f5f964f500fa82581ac27a47f075812610e1757ba1ca5ac7d055dccc0d819ec06a86ca98f395
 SHA512 
c8a843cf04b72f010eef405cc2d029e49fb1f4582686f1e0409579d544b02d249c31f7cb9cd59747bc94727e29ddaba89951043b392017c6963ca14f3a0202b1

diff --git a/sys-devel/binutils/binutils-2.34-r1.ebuild 
b/sys-devel/binutils/binutils-2.34-r1.ebuild
index 4948e72ad99..4623a16515c 100644
--- a/sys-devel/binutils/binutils-2.34-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.34-r1.ebuild
@@ -19,7 +19,7 @@ REQUIRED_USE="default-gold? ( gold )"
 # PATCH_DEV  - Use download URI 
https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
 #  for the patchsets
 
-PATCH_VER=4
+PATCH_VER=5
 PATCH_DEV=dilfridge
 
 case ${PV} in
@@ -84,11 +84,6 @@ BDEPEND="
 
 RESTRICT="!test? ( test )"
 
-PATCHES=(
-   "${FILESDIR}"/${PN}-2.33-gcc-10.patch
-   "${FILESDIR}"/${PN}-2.34-riscv-SEGV.patch
-)
-
 MY_BUILDDIR=${WORKDIR}/build
 
 src_unpack() {

diff --git a/sys-devel/binutils/files/binutils-2.34-riscv-SEGV.patch 
b/sys-devel/binutils/files/binutils-2.34-riscv-SEGV.patch
deleted file mode 100644
index ac70e504918..000
--- a/sys-devel/binutils/files/binutils-2.34-riscv-SEGV.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-https://sourceware.org/PR25900
-https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=a2714d6cca1f1c7695f8dc84b49a4a51d1db86c8
-
-From a2714d6cca1f1c7695f8dc84b49a4a51d1db86c8 Mon Sep 17 00:00:00 2001
-From: Alan Modra 
-Date: Fri, 1 May 2020 15:32:00 +0930
-Subject: [PATCH] PR25900, RISC-V: null pointer dereference
-
-   PR 25900
-   * elfnn-riscv.c (_bfd_riscv_relax_section): Check root.type before
-   accessing root.u.def of symbols.  Also check root.u.def.section
-   is non-NULL.  Reverse tests so as to make the logic positive.
-
 a/bfd/elfnn-riscv.c
-+++ b/bfd/elfnn-riscv.c
-@@ -4161,15 +4161,16 @@ _bfd_riscv_relax_section (bfd *abfd, asection *sec,
- symval = 0;
- sym_sec = bfd_und_section_ptr;
-   }
--else if (h->root.u.def.section->

[gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2020-03-09 Thread Sergei Trofimovich
commit: 31ea5c5ef16889c000670d48d769294823fa1cd4
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Mar  9 20:07:11 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Mar  9 20:07:44 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=31ea5c5e

sys-devel/binutils: tweak 2.32 for gcc-10

Package-Manager: Portage-2.3.93, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich  gentoo.org>

 sys-devel/binutils/binutils-2.32-r2.ebuild  |  9 +++--
 sys-devel/binutils/files/binutils-2.32-gcc-10.patch | 16 
 2 files changed, 23 insertions(+), 2 deletions(-)

diff --git a/sys-devel/binutils/binutils-2.32-r2.ebuild 
b/sys-devel/binutils/binutils-2.32-r2.ebuild
index 3e54336e168..0242f709569 100644
--- a/sys-devel/binutils/binutils-2.32-r2.ebuild
+++ b/sys-devel/binutils/binutils-2.32-r2.ebuild
@@ -55,8 +55,13 @@ PATCH_DEV=${PATCH_DEV:-slyfox}
 [[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}

https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz";
 
-# Disable gold testsuite since it always fails.
-PATCHES=( "${FILESDIR}/${PN}-2.29.1-nogoldtest.patch" )
+PATCHES=(
+   # Disable gold testsuite since it always fails.
+   "${FILESDIR}/${PN}-2.29.1-nogoldtest.patch"
+
+   "${FILESDIR}"/${PN}-2.32-gcc-10.patch
+   "${FILESDIR}"/${PN}-2.33-gcc-10.patch
+)
 
 #
 # The cross-compile logic

diff --git a/sys-devel/binutils/files/binutils-2.32-gcc-10.patch 
b/sys-devel/binutils/files/binutils-2.32-gcc-10.patch
new file mode 100644
index 000..fa7069456cd
--- /dev/null
+++ b/sys-devel/binutils/files/binutils-2.32-gcc-10.patch
@@ -0,0 +1,16 @@
+commit a3972330f49f81b3bea64af0970d22f42ae56ec3
+Author: Martin Liska 
+Date:   Fri Jun 7 07:36:52 2019 +0200
+
+Fix a missing include of 
+
+--- a/gold/errors.h
 b/gold/errors.h
+@@ -24,6 +24,7 @@
+ #define GOLD_ERRORS_H
+ 
+ #include 
++#include 
+ 
+ #include "gold-threads.h"
+ 



[gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2020-02-03 Thread Sergei Trofimovich
commit: 5326052334173df3a415108db673d79d5023812c
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Feb  3 09:50:03 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Feb  3 09:50:30 2020 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=53260523

sys-devel/binutils: tweak for gcc-10

Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich  gentoo.org>

 sys-devel/binutils/binutils-2.33.1-r1.ebuild   |  4 +++
 sys-devel/binutils/binutils-2.34.ebuild|  4 +++
 .../binutils/files/binutils-2.33-gcc-10.patch  | 39 ++
 3 files changed, 47 insertions(+)

diff --git a/sys-devel/binutils/binutils-2.33.1-r1.ebuild 
b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
index b961ec55af1..c76f4471a2f 100644
--- a/sys-devel/binutils/binutils-2.33.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.33.1-r1.ebuild
@@ -83,6 +83,10 @@ DEPEND="${RDEPEND}
 
 RESTRICT="!test? ( test )"
 
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.33-gcc-10.patch
+)
+
 MY_BUILDDIR=${WORKDIR}/build
 
 src_unpack() {

diff --git a/sys-devel/binutils/binutils-2.34.ebuild 
b/sys-devel/binutils/binutils-2.34.ebuild
index 8dcfe353355..d2f3d447c2b 100644
--- a/sys-devel/binutils/binutils-2.34.ebuild
+++ b/sys-devel/binutils/binutils-2.34.ebuild
@@ -83,6 +83,10 @@ DEPEND="${RDEPEND}
 
 RESTRICT="!test? ( test )"
 
+PATCHES=(
+   "${FILESDIR}"/${PN}-2.33-gcc-10.patch
+)
+
 MY_BUILDDIR=${WORKDIR}/build
 
 src_unpack() {

diff --git a/sys-devel/binutils/files/binutils-2.33-gcc-10.patch 
b/sys-devel/binutils/files/binutils-2.33-gcc-10.patch
new file mode 100644
index 000..9e1a999be9e
--- /dev/null
+++ b/sys-devel/binutils/files/binutils-2.33-gcc-10.patch
@@ -0,0 +1,39 @@
+binutils: drop redundant 'program_name' definition
+
+https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commitdiff;h=0b398d69acde3377dfbbeb8a4cfe87ae8c8562fa
+--- a/binutils/coffdump.c
 b/binutils/coffdump.c
+@@ -456,8 +456,6 @@ coff_dump (struct coff_ofile *ptr)
+ dump_coff_section (ptr->sections + i);
+ }
+ 
+-char * program_name;
+-
+ static void
+ show_usage (FILE *file, int status)
+ {
+--- a/binutils/srconv.c
 b/binutils/srconv.c
+@@ -1687,8 +1687,6 @@ prescan (struct coff_ofile *otree)
+ }
+ }
+ 
+-char *program_name;
+-
+ ATTRIBUTE_NORETURN static void
+ show_usage (FILE *ffile, int status)
+ {
+--- a/binutils/sysdump.c
 b/binutils/sysdump.c
+@@ -633,8 +633,6 @@ module (void)
+ }
+ }
+ 
+-char *program_name;
+-
+ ATTRIBUTE_NORETURN static void
+ show_usage (FILE *ffile, int status)
+ {
+-- 
+2.25.0
+



[gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2018-07-17 Thread Andreas Hüttel
commit: 618e132c04322f3d7667226060f83cd229ce12bf
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Tue Jul 17 14:25:36 2018 +
Commit: Andreas Hüttel  gentoo  org>
CommitDate: Tue Jul 17 14:26:06 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=618e132c

sys-devel/binutils: Remove x bit of script and call chmod in ebuild

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-devel/binutils/binutils-2.31.ebuild| 1 +
 sys-devel/binutils/files/binutils-2.31-test-driver | 0
 2 files changed, 1 insertion(+)

diff --git a/sys-devel/binutils/binutils-2.31.ebuild 
b/sys-devel/binutils/binutils-2.31.ebuild
index eff39eb37c2..ea7e40bf967 100644
--- a/sys-devel/binutils/binutils-2.31.ebuild
+++ b/sys-devel/binutils/binutils-2.31.ebuild
@@ -102,6 +102,7 @@ src_unpack() {
 src_prepare() {
# this file is missing in the 2.31 tarball, affects gold testsuite
cp "${FILESDIR}/${P}-test-driver" "${S}/test-driver" || die
+   chmod +x "${S}/test-driver" || die
 
if [[ ! -z ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset 
${PATCH_VER}"

diff --git a/sys-devel/binutils/files/binutils-2.31-test-driver 
b/sys-devel/binutils/files/binutils-2.31-test-driver
old mode 100755
new mode 100644



[gentoo-commits] repo/gentoo:master commit in: sys-devel/binutils/files/, sys-devel/binutils/

2018-07-17 Thread Andreas Hüttel
commit: ef08daac0af2f3f617e38e80686121e87d491dfb
Author: Andreas K. Hüttel  gentoo  org>
AuthorDate: Tue Jul 17 14:18:13 2018 +
Commit: Andreas Hüttel  gentoo  org>
CommitDate: Tue Jul 17 14:20:22 2018 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ef08daac

sys-devel/binutils: Semi-fix 2.31 gold testsuite

https://sourceware.org/ml/binutils/2018-07/msg00225.html

Package-Manager: Portage-2.3.40, Repoman-2.3.9

 sys-devel/binutils/binutils-2.31.ebuild|   3 +
 sys-devel/binutils/files/binutils-2.31-test-driver | 148 +
 2 files changed, 151 insertions(+)

diff --git a/sys-devel/binutils/binutils-2.31.ebuild 
b/sys-devel/binutils/binutils-2.31.ebuild
index a2e72661a56..eff39eb37c2 100644
--- a/sys-devel/binutils/binutils-2.31.ebuild
+++ b/sys-devel/binutils/binutils-2.31.ebuild
@@ -100,6 +100,9 @@ src_unpack() {
 }
 
 src_prepare() {
+   # this file is missing in the 2.31 tarball, affects gold testsuite
+   cp "${FILESDIR}/${P}-test-driver" "${S}/test-driver" || die
+
if [[ ! -z ${PATCH_VER} ]] ; then
einfo "Applying binutils-${PATCH_BINUTILS_VER} patchset 
${PATCH_VER}"
eapply "${WORKDIR}/patch"/*.patch

diff --git a/sys-devel/binutils/files/binutils-2.31-test-driver 
b/sys-devel/binutils/files/binutils-2.31-test-driver
new file mode 100755
index 000..0218a01f616
--- /dev/null
+++ b/sys-devel/binutils/files/binutils-2.31-test-driver
@@ -0,0 +1,148 @@
+#! /bin/sh
+# test-driver - basic testsuite driver script.
+
+scriptversion=2016-01-11.22; # UTC
+
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see .
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to  or send patches to
+# .
+
+# Make unconditional expansion of undefined variables an error.  This
+# helps a lot in preventing typo-related bugs.
+set -u
+
+usage_error ()
+{
+  echo "$0: $*" >&2
+  print_usage >&2
+  exit 2
+}
+
+print_usage ()
+{
+  cat <$log_file 2>&1
+estatus=$?
+
+if test $enable_hard_errors = no && test $estatus -eq 99; then
+  tweaked_estatus=1
+else
+  tweaked_estatus=$estatus
+fi
+
+case $tweaked_estatus:$expect_failure in
+  0:yes) col=$red res=XPASS recheck=yes gcopy=yes;;
+  0:*)   col=$grn res=PASS  recheck=no  gcopy=no;;
+  77:*)  col=$blu res=SKIP  recheck=no  gcopy=yes;;
+  99:*)  col=$mgn res=ERROR recheck=yes gcopy=yes;;
+  *:yes) col=$lgn res=XFAIL recheck=no  gcopy=yes;;
+  *:*)   col=$red res=FAIL  recheck=yes gcopy=yes;;
+esac
+
+# Report the test outcome and exit status in the logs, so that one can
+# know whether the test passed or failed simply by looking at the '.log'
+# file, without the need of also peaking into the corresponding '.trs'
+# file (automake bug#11814).
+echo "$res $test_name (exit status: $estatus)" >>$log_file
+
+# Report outcome to console.
+echo "${col}${res}${std}: $test_name"
+
+# Register the test result, and other relevant metadata.
+echo ":test-result: $res" > $trs_file
+echo ":global-test-result: $res" >> $trs_file
+echo ":recheck: $recheck" >> $trs_file
+echo ":copy-in-global-log: $gcopy" >> $trs_file
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC0"
+# time-stamp-end: "; # UTC"
+# End: