FS#69618 - binutils PKGBUILD cleanup

Attached to Project: Arch Linux
Opened by Christer Solskogen (solskogen) - Thursday, 11 February 2021, 11:22 GMT
Last edited by Allan McRae (Allan) - Thursday, 11 February 2021, 12:18 GMT
Task Type General Gripe
Category Packages: Core
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Here's a patch for binutils PKGBUILD.
CPPFLAG workaround is replaced, unneeded configure flags removed. And namcap is more pleased with the regards to the dependencies.
ccache can also be used, so !ccache is removed.

diff --git a/trunk/PKGBUILD b/trunk/PKGBUILD
index 8e9a071..4d51375 100644
--- a/trunk/PKGBUILD
+++ b/trunk/PKGBUILD
@@ -11,11 +11,11 @@ arch=(x86_64)
url='https://www.gnu.org/software/binutils/'
license=(GPL)
groups=(base-devel)
-depends=(glibc zlib elfutils)
-makedepends=(elfutils git)
+depends=(libelf)
+makedepends=(git)
conflicts=(binutils-multilib)
replaces=(binutils-multilib)
-options=(staticlibs !distcc !ccache)
+options=(staticlibs !distcc)
#_commit=cb5f6a3e146cc70bc2d864989386df80acec5d3e
#source=(git+https://sourceware.org/git/binutils-gdb.git#commit=$_commit)
source=(https://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.xz{,.sig})
@@ -32,8 +32,11 @@ prepare() {
# Turn off development mode (-Werror, gas run-time checks, date in sonames)
sed -i '/^development=/s/true/false/' bfd/development.sh

- # hack! - libiberty configure tests for header files using "$CPP $CPPFLAGS"
- sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+ #hack - Having CPPFLAGS defined makes the build barf. Workaround it like this:
+ _cppflags=$CPPFLAGS
+ CFLAGS="$_cppflags $CFLAGS"
+ CXXFLAGS="$CFLAGS"
+ unset CPPFLAGS
}

build() {
@@ -41,17 +44,12 @@ build() {

"$srcdir/binutils-gdb/configure" \
--prefix=/usr \
- --with-lib-path=/usr/lib:/usr/local/lib \
--with-bugurl=https://bugs.archlinux.org/ \
- --enable-cet \
--enable-deterministic-archives \
--enable-gold \
- --enable-ld=default \
- --enable-lto \
--enable-plugins \
--enable-relro \
--enable-targets=x86_64-pep \
- --enable-threads \
--disable-gdb \
--disable-werror \
--with-debuginfod \
This task depends upon

Closed by  Allan McRae (Allan)
Thursday, 11 February 2021, 12:18 GMT
Reason for closing:  Not a bug
Comment by Allan McRae (Allan) - Thursday, 11 February 2021, 12:18 GMT
namcap is a steaming pile of crap, so pay no attention to its output. Actual dependencies should always be listed, especially for [core] packages.

The CPPFLAGS hack will be replace by moving FORTIFY_SOURCE into CFLAGS with -Wp,.. in the future.

And explicitly stating configure options is always better than relying on defaults that may change.

I see no improvements needing merged.

Loading...