sys-devel/binutils: Sync with Gentoo

It's from Gentoo commit 68466c8b5bda1cbf82e364763c42c7c9df1dfff0.
This commit is contained in:
Flatcar Buildbot 2024-03-11 07:16:48 +00:00 committed by Krzesimir Nowak
parent 8dd4e80f71
commit 6bdec3b6af
15 changed files with 119 additions and 11 deletions

View File

@ -281,6 +281,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug 637066
filter-flags -Wall -Wreturn-type

View File

@ -274,6 +274,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug 637066
filter-flags -Wall -Wreturn-type

View File

@ -275,6 +275,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug 637066
filter-flags -Wall -Wreturn-type

View File

@ -299,6 +299,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug 637066
filter-flags -Wall -Wreturn-type

View File

@ -294,6 +294,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug 637066
filter-flags -Wall -Wreturn-type

View File

@ -313,6 +313,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug 637066
filter-flags -Wall -Wreturn-type

View File

@ -321,6 +321,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}"
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug 637066
filter-flags -Wall -Wreturn-type

View File

@ -336,6 +336,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}" || die
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug #637066
filter-flags -Wall -Wreturn-type

View File

@ -348,6 +348,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}" || die
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug #637066
filter-flags -Wall -Wreturn-type

View File

@ -366,6 +366,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}" || die
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug #637066
filter-flags -Wall -Wreturn-type

View File

@ -366,6 +366,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}" || die
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug #637066
filter-flags -Wall -Wreturn-type

View File

@ -371,6 +371,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}" || die
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug #637066
filter-flags -Wall -Wreturn-type

View File

@ -32,7 +32,7 @@ else
[[ -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
#
@ -371,6 +371,10 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}" || die
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
# bug #637066
filter-flags -Wall -Wreturn-type

View File

@ -270,7 +270,7 @@ src_configure() {
$(use_with zstd)
# Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
--disable-{gdb,gdbserver,libbacktrace,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. bug #666100
@ -333,10 +333,20 @@ src_configure() {
)
fi
if use test || { use pgo && tc-is-lto ; } ; then
# -Wa,* needs to be consistent everywhere or lto-wrapper will complain
filter-flags '-Wa,*'
fi
if ! is_cross ; then
myconf+=( $(use_enable pgo pgo-build lto) )
myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) )
if use pgo ; then
# We let configure handle it for us because it has to run
# the testsuite later on for profiling, and LTO isn't compatible
# with the testsuite.
filter-lto
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
@ -374,10 +384,28 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}" || die
# bug #637066
filter-flags -Wall -Wreturn-type
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
emake -k check
(
# Tests don't expect LTO
filter-lto
# lto-wrapper warnings which confuse tests
filter-flags '-Wa,*'
# bug #637066
filter-flags -Wall -Wreturn-type
emake -k check \
CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}"
)
}
src_install() {

View File

@ -270,7 +270,7 @@ src_configure() {
$(use_with zstd)
# Disable modules that are in a combined binutils/gdb tree, bug #490566
--disable-{gdb,libdecnumber,readline,sim}
--disable-{gdb,gdbserver,libbacktrace,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. bug #666100
@ -333,10 +333,20 @@ src_configure() {
)
fi
if use test || { use pgo && tc-is-lto ; } ; then
# -Wa,* needs to be consistent everywhere or lto-wrapper will complain
filter-flags '-Wa,*'
fi
if ! is_cross ; then
myconf+=( $(use_enable pgo pgo-build lto) )
myconf+=( $(use_enable pgo pgo-build $(tc-is-lto && echo "lto" || echo "yes")) )
if use pgo ; then
# We let configure handle it for us because it has to run
# the testsuite later on for profiling, and LTO isn't compatible
# with the testsuite.
filter-lto
export BUILD_CFLAGS="${CFLAGS}"
fi
fi
@ -374,10 +384,28 @@ src_compile() {
src_test() {
cd "${MY_BUILDDIR}" || die
# bug #637066
filter-flags -Wall -Wreturn-type
# https://sourceware.org/PR31327
local -x XZ_OPT="-T1"
local -x XZ_DEFAULTS="-T1"
emake -k check
(
# Tests don't expect LTO
filter-lto
# lto-wrapper warnings which confuse tests
filter-flags '-Wa,*'
# bug #637066
filter-flags -Wall -Wreturn-type
emake -k check \
CFLAGS_FOR_TARGET="${CFLAGS_FOR_TARGET:-${CFLAGS}}" \
CXXFLAGS_FOR_TARGET="${CXXFLAGS_FOR_TARGET:-${CXXFLAGS}}" \
LDFLAGS_FOR_TARGET="${LDFLAGS_FOR_TARGET:-${LDFLAGS}}" \
CFLAGS="${CFLAGS}" \
CXXFLAGS="${CXXFLAGS}" \
LDFLAGS="${LDFLAGS}"
)
}
src_install() {