diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2018-06-06 14:03:43 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2018-06-06 14:19:35 +0000 |
commit | b870dd8c4e66b1bb39542a6c6fd2c8e85f5101fe (patch) | |
tree | a58ee11ef51a95eaab116f200e7da137694efa38 | |
parent | d7f6298fbaef0e60392bf7475b5e433adf035853 (diff) | |
download | alpine_aports-b870dd8c4e66b1bb39542a6c6fd2c8e85f5101fe.tar.bz2 alpine_aports-b870dd8c4e66b1bb39542a6c6fd2c8e85f5101fe.tar.xz alpine_aports-b870dd8c4e66b1bb39542a6c6fd2c8e85f5101fe.zip |
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
-rw-r--r-- | main/binutils/APKBUILD | 14 |
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 @@ | |||
1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> | 1 | # Maintainer: Natanael Copa <ncopa@alpinelinux.org> |
2 | pkgname=binutils | 2 | pkgname=binutils |
3 | pkgver=2.30 | 3 | pkgver=2.30 |
4 | pkgrel=3 | 4 | pkgrel=4 |
5 | pkgdesc="Tools necessary to build programs" | 5 | pkgdesc="Tools necessary to build programs" |
6 | url="https://www.gnu.org/software/binutils/" | 6 | url="https://www.gnu.org/software/binutils/" |
7 | depends="" | 7 | depends="" |
@@ -37,6 +37,8 @@ build() { | |||
37 | if [ "$CHOST" != "$CTARGET" ]; then | 37 | if [ "$CHOST" != "$CTARGET" ]; then |
38 | _sysroot="$CBUILDROOT" | 38 | _sysroot="$CBUILDROOT" |
39 | _cross_configure="--disable-install-libiberty" | 39 | _cross_configure="--disable-install-libiberty" |
40 | else | ||
41 | _cross_configure="--enable-shared" | ||
40 | fi | 42 | fi |
41 | 43 | ||
42 | if [ "$CTARGET_ARCH" = "x86_64" ]; then | 44 | if [ "$CTARGET_ARCH" = "x86_64" ]; then |
@@ -68,16 +70,16 @@ build() { | |||
68 | $_cross_configure \ | 70 | $_cross_configure \ |
69 | $_arch_configure \ | 71 | $_arch_configure \ |
70 | $_hash_style_configure \ | 72 | $_hash_style_configure \ |
73 | --with-pic \ | ||
71 | --disable-werror \ | 74 | --disable-werror \ |
72 | --disable-nls \ | 75 | --disable-nls \ |
73 | --with-system-zlib \ | 76 | --with-system-zlib |
74 | || return 1 | 77 | make |
75 | make || return 1 | ||
76 | } | 78 | } |
77 | 79 | ||
78 | package() { | 80 | package() { |
79 | cd "$builddir" | 81 | cd "$builddir" |
80 | make install DESTDIR="$pkgdir" || return 1 | 82 | make install DESTDIR="$pkgdir" |
81 | if [ -d "$pkgdir"/usr/lib64 ]; then | 83 | if [ -d "$pkgdir"/usr/lib64 ]; then |
82 | mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/ | 84 | mv "$pkgdir"/usr/lib64/* "$pkgdir"/usr/lib/ |
83 | rmdir "$pkgdir"/usr/lib64 | 85 | rmdir "$pkgdir"/usr/lib64 |
@@ -94,7 +96,7 @@ libs() { | |||
94 | pkgdesc="Runtime libraries from binutils - libbfd and libopcodes" | 96 | pkgdesc="Runtime libraries from binutils - libbfd and libopcodes" |
95 | 97 | ||
96 | mkdir -p "$subpkgdir"/usr/lib | 98 | mkdir -p "$subpkgdir"/usr/lib |
97 | mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/ || return 1 | 99 | mv "$pkgdir"/usr/lib/lib*.so "$subpkgdir"/usr/lib/ |
98 | } | 100 | } |
99 | 101 | ||
100 | gold() { | 102 | gold() { |