2018-07-16 20:45:36 +02:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
# Copyright (C) 2009-2016 Stephan Raue (stephan@openelec.tv)
|
2018-07-31 12:07:34 +01:00
|
|
|
# Copyright (C) 2018-present Team LibreELEC (https://libreelec.tv)
|
2011-01-09 18:41:03 +01:00
|
|
|
|
2010-11-19 00:31:16 +01:00
|
|
|
PKG_NAME="binutils"
|
2025-02-02 14:55:48 +00:00
|
|
|
PKG_VERSION="2.44"
|
|
|
|
|
PKG_SHA256="67be9198476cc37436e2801de649f4ad80bf0d02430d86aff63c6b59b6e23987"
|
2010-11-19 00:31:16 +01:00
|
|
|
PKG_LICENSE="GPL"
|
2021-05-07 20:00:50 +00:00
|
|
|
PKG_SITE="https://www.gnu.org/software/binutils/"
|
2025-02-02 14:55:48 +00:00
|
|
|
PKG_URL="https://ftp.gnu.org/gnu/binutils/${PKG_NAME}-with-gold-${PKG_VERSION}.tar.xz"
|
2014-08-15 22:41:29 +03:00
|
|
|
PKG_DEPENDS_HOST="ccache:host bison:host flex:host linux:host"
|
2019-11-21 18:21:04 +01:00
|
|
|
PKG_DEPENDS_TARGET="toolchain zlib binutils:host"
|
2018-10-22 15:06:12 +02:00
|
|
|
PKG_LONGDESC="A GNU collection of binary utilities."
|
2014-01-05 16:03:40 +01:00
|
|
|
|
2021-01-19 19:33:48 +00:00
|
|
|
PKG_CONFIGURE_OPTS_HOST="--target=${TARGET_NAME} \
|
|
|
|
|
--with-sysroot=${SYSROOT_PREFIX} \
|
|
|
|
|
--with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \
|
2014-08-02 00:56:56 +02:00
|
|
|
--without-ppl \
|
2021-02-21 11:20:34 +00:00
|
|
|
--enable-static \
|
2014-08-02 00:56:56 +02:00
|
|
|
--without-cloog \
|
2014-01-05 16:03:40 +01:00
|
|
|
--disable-werror \
|
|
|
|
|
--disable-multilib \
|
|
|
|
|
--disable-libada \
|
|
|
|
|
--disable-libssp \
|
|
|
|
|
--enable-version-specific-runtime-libs \
|
|
|
|
|
--enable-plugins \
|
|
|
|
|
--enable-gold \
|
|
|
|
|
--enable-ld=default \
|
|
|
|
|
--enable-lto \
|
|
|
|
|
--disable-nls"
|
|
|
|
|
|
2021-01-19 19:33:48 +00:00
|
|
|
PKG_CONFIGURE_OPTS_TARGET="--target=${TARGET_NAME} \
|
|
|
|
|
--with-sysroot=${SYSROOT_PREFIX} \
|
|
|
|
|
--with-lib-path=${SYSROOT_PREFIX}/lib:${SYSROOT_PREFIX}/usr/lib \
|
2019-11-21 18:21:04 +01:00
|
|
|
--with-system-zlib \
|
2018-02-05 11:29:08 +01:00
|
|
|
--without-ppl \
|
|
|
|
|
--without-cloog \
|
2018-02-19 11:22:34 +01:00
|
|
|
--enable-static \
|
|
|
|
|
--disable-shared \
|
2018-02-05 11:29:08 +01:00
|
|
|
--disable-werror \
|
|
|
|
|
--disable-multilib \
|
|
|
|
|
--disable-libada \
|
|
|
|
|
--disable-libssp \
|
|
|
|
|
--disable-plugins \
|
|
|
|
|
--disable-gold \
|
|
|
|
|
--disable-ld \
|
|
|
|
|
--disable-lto \
|
|
|
|
|
--disable-nls"
|
|
|
|
|
|
2014-01-05 16:03:40 +01:00
|
|
|
pre_configure_host() {
|
|
|
|
|
unset CPPFLAGS
|
|
|
|
|
unset CFLAGS
|
|
|
|
|
unset CXXFLAGS
|
|
|
|
|
unset LDFLAGS
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
make_host() {
|
|
|
|
|
make configure-host
|
2022-06-19 12:04:44 +00:00
|
|
|
# override the makeinfo binary with true - this does not build the documentation
|
2022-06-19 07:21:21 +00:00
|
|
|
make MAKEINFO=true
|
2014-01-05 16:03:40 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
makeinstall_host() {
|
2021-01-19 19:33:48 +00:00
|
|
|
cp -v ../include/libiberty.h ${SYSROOT_PREFIX}/usr/include
|
2023-01-14 17:03:36 +00:00
|
|
|
make -C libsframe install # bfd is reliant on libsframe
|
2021-02-18 20:39:14 +00:00
|
|
|
make -C bfd install # fix parallel build with libctf requiring bfd
|
2022-06-19 12:04:44 +00:00
|
|
|
# override the makeinfo binary with true - this does not build the documentation
|
2022-08-07 10:54:35 +00:00
|
|
|
make HELP2MAN=true MAKEINFO=true install
|
2014-01-05 16:03:40 +01:00
|
|
|
}
|
2018-02-05 11:29:08 +01:00
|
|
|
|
|
|
|
|
make_target() {
|
|
|
|
|
make configure-host
|
2018-02-19 11:22:34 +01:00
|
|
|
make -C libiberty
|
|
|
|
|
make -C bfd
|
2019-03-25 09:48:40 +01:00
|
|
|
make -C opcodes
|
2019-09-03 19:05:15 +01:00
|
|
|
make -C binutils strings
|
2018-02-05 11:29:08 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
makeinstall_target() {
|
2021-01-19 19:33:48 +00:00
|
|
|
mkdir -p ${SYSROOT_PREFIX}/usr/lib
|
|
|
|
|
cp libiberty/libiberty.a ${SYSROOT_PREFIX}/usr/lib
|
|
|
|
|
make DESTDIR="${SYSROOT_PREFIX}" -C bfd install
|
|
|
|
|
make DESTDIR="${SYSROOT_PREFIX}" -C opcodes install
|
2019-09-03 19:05:15 +01:00
|
|
|
|
|
|
|
|
mkdir -p ${INSTALL}/usr/bin
|
|
|
|
|
cp binutils/strings ${INSTALL}/usr/bin
|
2018-02-05 11:29:08 +01:00
|
|
|
}
|