aboutsummaryrefslogtreecommitdiffstats
path: root/main/binutils
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-06-06 14:03:43 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-06-06 14:19:35 +0000
commitb870dd8c4e66b1bb39542a6c6fd2c8e85f5101fe (patch)
treea58ee11ef51a95eaab116f200e7da137694efa38 /main/binutils
parentd7f6298fbaef0e60392bf7475b5e433adf035853 (diff)
downloadaports-b870dd8c4e66b1bb39542a6c6fd2c8e85f5101fe.tar.bz2
aports-b870dd8c4e66b1bb39542a6c6fd2c8e85f5101fe.tar.xz
main/binutils: build --with-pic and --enable-shared
add --enable-shared unless we are making a cross compiler shared libs reduces size The --with-pic fixes the error: relocation R_X86_64_PC32 against symbol `_bfd_std_section' can not be used when making a shared object; Also modernize a bit while at it
Diffstat (limited to 'main/binutils')
-rw-r--r--main/binutils/APKBUILD14
1 files changed, 8 insertions, 6 deletions
diff --git a/main/binutils/APKBUILD b/main/binutils/APKBUILD
index cb4e5f58e8..82fad39fd4 100644
--- a/main/binutils/APKBUILD
+++ b/main/binutils/APKBUILD
@@ -1,7 +1,7 @@
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=binutils
pkgver=2.30
-pkgrel=3
+pkgrel=4
pkgdesc="Tools necessary to build programs"
url="https://www.gnu.org/software/binutils/"
depends=""
@@ -37,6 +37,8 @@ build() {
if [ "$CHOST" != "$CTARGET" ]; then
_sysroot="$CBUILDROOT"
_cross_configure="--disable-install-libiberty"
+ else
+ _cross_configure="--enable-shared"
fi
if [ "$CTARGET_ARCH" = "x86_64" ]; then
@@ -68,16 +70,16 @@ build() {
$_cross_configure \
$_arch_configure \
$_hash_style_configure \
+ --with-pic \
--disable-werror \
--disable-nls \
- --with-system-zlib \
- || return 1
- make || return 1
+ --with-system-zlib
+ make
}
package() {
cd "$builddir"
- make install DESTDIR="$pkgdir" || return 1
+ make install DESTDIR="$pkgdir"
if [ -d "$pkgdir"/usr/lib64 ]; then
mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/
rmdir "$pkgdir"/usr/lib64
@@ -94,7 +96,7 @@ libs() {
pkgdesc="Runtime libraries from binutils - libbfd and libopcodes"
mkdir -p "$subpkgdir"/usr/lib
- mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/ || return 1
+ mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/
}
gold() {