Skip to content

Commit

Permalink
Ports: Install libiberty from binutils port
Browse files Browse the repository at this point in the history
Normally this is supposed to be installed from gdb or gcc. If a port
wants to link against libbfd though, we need to make sure libiberty is
actually available in the root filesytem without requiring the port to
depend on those larger packages.
  • Loading branch information
ADKaster authored and linusg committed Mar 13, 2023
1 parent 6ce7257 commit e690b35
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions Ports/binutils/package.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=binutils
version=2.39
useconfigure=true
use_fresh_config_sub=true
configopts=("--target=${SERENITY_ARCH}-pc-serenity" "--with-sysroot=/" "--with-build-sysroot=${SERENITY_INSTALL_ROOT}" "--disable-werror" "--disable-gdb" "--disable-nls")
port='binutils'
version='2.39'
useconfigure='true'
use_fresh_config_sub='true'
configopts=(
"--target=${SERENITY_ARCH}-pc-serenity"
"--with-sysroot=/"
"--with-build-sysroot=${SERENITY_INSTALL_ROOT}"
"--disable-werror"
"--disable-gdb"
"--disable-nls"
"--enable-libiberty"
)
files="https://ftpmirror.gnu.org/gnu/binutils/binutils-${version}.tar.xz binutils-${version}.tar.xz 645c25f563b8adc0a81dbd6a41cffbf4d37083a382e02d5d3df4f65c09516d00"
auth_type="sha256"
auth_opts=("--keyring" "./gnu-keyring.gpg" "binutils-${version}.tar.xz.sig")
depends=('zlib')

export ac_cv_func_getrusage=no

install() {
run make DESTDIR=${SERENITY_INSTALL_ROOT} "${installopts[@]}" install
run_nocd cp ${workdir}/include/libiberty.h ${SERENITY_INSTALL_ROOT}/usr/local/include
run_nocd cp ${workdir}/libiberty/libiberty.a ${SERENITY_INSTALL_ROOT}/usr/local/lib
}

0 comments on commit e690b35

Please sign in to comment.