8 |
8 |
DESCRIPTION="Tools necessary to build programs"
|
9 |
9 |
HOMEPAGE="https://sourceware.org/binutils/"
|
10 |
10 |
LICENSE="GPL-3+"
|
11 |
|
IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
|
|
11 |
IUSE="cet default-gold doc +gold multitarget +nls pgo +plugins static-libs test vanilla"
|
12 |
12 |
REQUIRED_USE="default-gold? ( gold )"
|
13 |
13 |
|
14 |
14 |
# Variables that can be set here (ignored for live ebuilds)
|
... | ... | |
19 |
19 |
# PATCH_DEV - Use download URI https://dev.gentoo.org/~{PATCH_DEV}/distfiles/...
|
20 |
20 |
# for the patchsets
|
21 |
21 |
|
22 |
|
PATCH_VER=5
|
|
22 |
PATCH_VER=2
|
23 |
23 |
PATCH_DEV=dilfridge
|
24 |
24 |
|
25 |
25 |
if [[ ${PV} == 9999* ]]; then
|
... | ... | |
27 |
27 |
SLOT=${PV}
|
28 |
28 |
else
|
29 |
29 |
PATCH_BINUTILS_VER=${PATCH_BINUTILS_VER:-${PV}}
|
30 |
|
PATCH_DEV=${PATCH_DEV:-slyfox}
|
31 |
|
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz"
|
|
30 |
PATCH_DEV=${PATCH_DEV:-dilfridge}
|
|
31 |
SRC_URI="mirror://gnu/binutils/binutils-${PV}.tar.xz https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PV}.tar.xz"
|
32 |
32 |
[[ -z ${PATCH_VER} ]] || SRC_URI="${SRC_URI}
|
33 |
33 |
https://dev.gentoo.org/~${PATCH_DEV}/distfiles/binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz"
|
34 |
34 |
SLOT=$(ver_cut 1-2)
|
35 |
|
KEYWORDS="~alpha amd64 arm arm64 ~hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
|
35 |
KEYWORDS="~alpha amd64 arm arm64 hppa ~m68k ~mips ppc ppc64 ~riscv ~s390 sparc x86"
|
36 |
36 |
fi
|
37 |
37 |
|
38 |
38 |
#
|
... | ... | |
81 |
81 |
EGIT_CHECKOUT_DIR=${S}
|
82 |
82 |
git-r3_src_unpack
|
83 |
83 |
else
|
84 |
|
unpack ${P}.tar.xz
|
|
84 |
unpack ${P/-hppa64/}.tar.xz
|
85 |
85 |
|
86 |
86 |
cd "${WORKDIR}" || die
|
87 |
87 |
unpack binutils-${PATCH_BINUTILS_VER}-patches-${PATCH_VER}.tar.xz
|
|
88 |
|
|
89 |
# _p patch versions are Gentoo specific tarballs ...
|
|
90 |
local dir=${P%_p?}
|
|
91 |
dir=${dir/-hppa64/}
|
|
92 |
|
|
93 |
S=${WORKDIR}/${dir}
|
88 |
94 |
fi
|
89 |
95 |
|
90 |
96 |
cd "${WORKDIR}" || die
|
... | ... | |
157 |
163 |
append-cflags $(test-flags-CC -std=gnu17)
|
158 |
164 |
append-ldflags $(test-flags-CCLD -Wl,--undefined-version)
|
159 |
165 |
|
|
166 |
use elibc_musl && append-ldflags -Wl,-z,stack-size=2097152
|
|
167 |
|
160 |
168 |
local x
|
161 |
169 |
echo
|
162 |
170 |
for x in CATEGORY CBUILD CHOST CTARGET CFLAGS LDFLAGS ; do
|
... | ... | |
233 |
241 |
--enable-install-libiberty
|
234 |
242 |
# Available from 2.35 on
|
235 |
243 |
--enable-textrel-check=warning
|
|
244 |
# Works better than vapier's patch... #808787
|
|
245 |
--enable-new-dtags
|
236 |
246 |
--disable-werror
|
237 |
247 |
--with-bugurl="$(toolchain-binutils_bugurl)"
|
238 |
248 |
--with-pkgversion="$(toolchain-binutils_pkgversion)"
|
... | ... | |
256 |
266 |
# But the check does not quite work on i686: bug #760926.
|
257 |
267 |
$(use_enable cet)
|
258 |
268 |
)
|
|
269 |
|
|
270 |
if ! is_cross ; then
|
|
271 |
myconf+=( $(use_enable pgo pgo-build lto) )
|
|
272 |
|
|
273 |
if use pgo ; then
|
|
274 |
export BUILD_CFLAGS="${CFLAGS}"
|
|
275 |
fi
|
|
276 |
fi
|
|
277 |
|
259 |
278 |
echo ./configure "${myconf[@]}"
|
260 |
279 |
"${S}"/configure "${myconf[@]}" || die
|
261 |
280 |
|