summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2021-10-31 15:24:24 -0300
committerDaniel Bermond2021-10-31 15:24:24 -0300
commitba4eb7e7479b51a71a60046f75ba0eba7c7334e0 (patch)
tree00e581a51d2fa71cb6127d170e10d0b20685fdce
parente55eaade5befc2caaa321545d343079eda14df8d (diff)
downloadaur-ba4eb7e7479b51a71a60046f75ba0eba7c7334e0.tar.gz
Update to version 2.37
-rw-r--r--.SRCINFO27
-rw-r--r--020-binutils-build-fix.patch81
-rw-r--r--PKGBUILD116
3 files changed, 162 insertions, 62 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 4c26e33951fc..3370d7d211f6 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,24 @@
pkgbase = mips64-linux-gnu-binutils
- pkgdesc = A set of programs to assemble and manipulate binary and object files for the MIPS64 target (Big Endian)
- pkgver = 2.29
+ pkgdesc = Tools to assemble and manipulate binary and object files for the MIPS64 target (for the toolchain with GNU C library and multilib ABI)
+ pkgver = 2.37
pkgrel = 1
- url = http://www.gnu.org/software/binutils/
- arch = i686
+ url = https://www.gnu.org/software/binutils/
arch = x86_64
license = GPL
+ depends = libelf
depends = zlib
- source = ftp://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.bz2
- source = ftp://ftp.gnu.org/gnu/binutils/binutils-2.29.tar.bz2.sig
- validpgpkeys = EAF1C276A747E9ED86210CBAC3126D3B4AE55E93
- sha1sums = 4376bce1e58d591c6a5dd44fc8713f154208d735
- sha1sums = SKIP
+ options = !emptydirs
+ options = staticlibs
+ options = !distcc
+ options = !ccache
+ source = https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.xz
+ source = https://ftp.gnu.org/gnu/binutils/binutils-2.37.tar.xz.sig
+ source = 010-binutils-mips64-default-to-64-emulation-gf26867f.patch::https://raw.githubusercontent.com/openembedded/openembedded-core/f26867fe4daec7299f59a82ae4a0d70cceb3e082/meta/recipes-devtools/binutils/binutils/0009-Change-default-emulation-for-mips64-linux.patch
+ source = 020-binutils-build-fix.patch
+ validpgpkeys = 3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F
+ sha256sums = 820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c
+ sha256sums = SKIP
+ sha256sums = 2e0c71612d770d3b9531fa66211ac7ef810ddbe6253efe440ec1a069b08926b9
+ sha256sums = 510296287d6e59b879e139e0b671ccc4d1ce5254b259a09dae4a20bacfe9cf63
pkgname = mips64-linux-gnu-binutils
-
diff --git a/020-binutils-build-fix.patch b/020-binutils-build-fix.patch
new file mode 100644
index 000000000000..27e83fa11c8e
--- /dev/null
+++ b/020-binutils-build-fix.patch
@@ -0,0 +1,81 @@
+--- a/libiberty/configure
++++ b/libiberty/configure
+@@ -2452,7 +2452,7 @@ fi
+ ## -------------------- ##
+
+ ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
++ac_cpp='$CPP $CPPFLAGS -O2'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+@@ -3121,7 +3121,7 @@ $as_echo "$as_me: target_header_dir = $t
+
+
+ ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
++ac_cpp='$CPP $CPPFLAGS -O2'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+@@ -3933,14 +3933,14 @@ if test "x$ac_cv_prog_cc_c89" != xno; th
+ fi
+
+ ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
++ac_cpp='$CPP $CPPFLAGS -O2'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
++ac_cpp='$CPP $CPPFLAGS -O2'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+@@ -4071,7 +4071,7 @@ See \`config.log' for more details" "$LI
+ fi
+
+ ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
++ac_cpp='$CPP $CPPFLAGS -O2'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+@@ -4602,7 +4602,7 @@ fi
+ ac_c_preproc_warn_flag=yes
+
+ ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
++ac_cpp='$CPP $CPPFLAGS -O2'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+@@ -4654,14 +4654,14 @@ fi
+ done
+ CFLAGS="$save_CFLAGS"
+ ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
++ac_cpp='$CPP $CPPFLAGS -O2'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+ ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
++ac_cpp='$CPP $CPPFLAGS -O2'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+@@ -4703,7 +4703,7 @@ fi
+
+ fi
+ ac_ext=c
+-ac_cpp='$CPP $CPPFLAGS'
++ac_cpp='$CPP $CPPFLAGS -O2'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
diff --git a/PKGBUILD b/PKGBUILD
index 43929f61fd85..2f847ab1f4e3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,67 +1,79 @@
-# $Id$
-# Creator Anatol Pomozov <anatol.pomozov@gmail.com>
-# Adapt for MIPS64: Valentín Kivachuk <vk18496@gmail.com>
+# Maintainer : Daniel Bermond <dbermond@archlinux.org>
+# Contributor: Valentín Kivachuk <vk18496@gmail.com>
_target=mips64-linux-gnu
-pkgname=$_target-binutils
-pkgver=2.29
+pkgname="${_target}-binutils"
+pkgver=2.37
pkgrel=1
-#_commit=2bd25930
-pkgdesc='A set of programs to assemble and manipulate binary and object files for the MIPS64 target (Big Endian)'
-arch=(i686 x86_64)
-url='http://www.gnu.org/software/binutils/'
-license=(GPL)
-depends=(zlib)
-source=(ftp://ftp.gnu.org/gnu/binutils/binutils-$pkgver.tar.bz2{,.sig})
-sha1sums=('4376bce1e58d591c6a5dd44fc8713f154208d735'
- 'SKIP')
-validpgpkeys=('EAF1C276A747E9ED86210CBAC3126D3B4AE55E93') # Tristan Gingold <gingold@adacore.com>
+pkgdesc='Tools to assemble and manipulate binary and object files for the MIPS64 target (for the toolchain with GNU C library and multilib ABI)'
+arch=('x86_64')
+url='https://www.gnu.org/software/binutils/'
+license=('GPL')
+depends=('libelf' 'zlib')
+options=('!emptydirs' 'staticlibs' '!distcc' '!ccache')
+_patchver='f26867fe4daec7299f59a82ae4a0d70cceb3e082'
+source=("https://ftp.gnu.org/gnu/binutils/binutils-${pkgver}.tar.xz"{,.sig}
+ "010-binutils-mips64-default-to-64-emulation-g${_patchver:0:7}.patch"::"https://raw.githubusercontent.com/openembedded/openembedded-core/${_patchver}/meta/recipes-devtools/binutils/binutils/0009-Change-default-emulation-for-mips64-linux.patch"
+ '020-binutils-build-fix.patch')
+sha256sums=('820d9724f020a3e69cb337893a0b63c2db161dadcb0e06fc11dc29eb1e84a32c'
+ 'SKIP'
+ '2e0c71612d770d3b9531fa66211ac7ef810ddbe6253efe440ec1a069b08926b9'
+ '510296287d6e59b879e139e0b671ccc4d1ce5254b259a09dae4a20bacfe9cf63')
+validpgpkeys=('3A24BC1E8FB409FA9F14371813FCEF89DD9E3C4F') # Nick Clifton
prepare() {
- cd binutils-$pkgver
- sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" libiberty/configure
+ mkdir -p build
+ patch -d "binutils-${pkgver}" -Np1 -i "${srcdir}/010-binutils-mips64-default-to-64-emulation-g${_patchver:0:7}.patch"
+ patch -d "binutils-${pkgver}" -Np1 -i "${srcdir}/020-binutils-build-fix.patch"
}
build() {
- cd binutils-$pkgver
-
- if [ "${CARCH}" != "i686" ];
- then
- # enabling gold linker at i686 makes the install fail
- enable_gold='--enable-gold'
- fi
-
- ./configure --target=$_target \
- --with-sysroot=/usr/$_target \
- --prefix=/usr \
- --disable-multilib \
- --with-gnu-as \
- --with-gnu-ld \
- --disable-nls \
- --enable-ld=default \
- $enable_gold \
- --enable-plugins \
- --enable-deterministic-archives
-
- make
+ cd build
+ "${srcdir}/binutils-${pkgver}/configure" \
+ --build="$CHOST" \
+ --host="$CHOST" \
+ --target="$_target" \
+ --prefix='/usr' \
+ --with-sysroot="/usr/${_target}" \
+ --enable-cet \
+ --enable-deterministic-archives \
+ --enable-gold \
+ --enable-ld='default' \
+ --enable-lto \
+ --enable-plugins \
+ --enable-relro \
+ --enable-threads \
+ --enable-multilib \
+ --disable-gdb \
+ --disable-werror \
+ --with-debuginfod \
+ --with-pic \
+ --with-system-zlib \
+ --with-gnu-as \
+ --with-gnu-ld
+ make
}
check() {
- cd binutils-$pkgver
-
- # unset LDFLAGS as testsuite makes assumptions about which ones are active
- # do not abort on errors - manually check log files
- make -k LDFLAGS="" check || true
+ # unset LDFLAGS as testsuite makes assumptions about which ones are active
+ # ignore failures in gold testsuite...
+ make -C build -k LDFLAGS='' check || true
}
package() {
- cd binutils-$pkgver
-
- make DESTDIR="$pkgdir" install
-
- # Remove file conflicting with host binutils and manpages for MS Windows tools
- rm "$pkgdir"/usr/share/man/man1/$_target-{dlltool,nlmconv,windres,windmc}*
-
- # Remove info documents that conflict with host version
- rm -r "$pkgdir"/usr/share/info
+ make -C build DESTDIR="$pkgdir" install
+
+ # remove unwanted Windows files
+ rm "${pkgdir}/usr/share/man/man1/${_target}"-{dlltool,windmc,windres}*
+
+ # remove conflicting files
+ rm -r "${pkgdir}/usr"/{lib/bfd-plugins,share/{info,locale}}
+
+ # replace cross-directory hardlinks with symlinks
+ local _file
+ rm "${pkgdir}/usr/${_target}/bin"/*
+ while read -r -d '' _file
+ do
+ ln -s "../../bin/${_file##*/}" "${pkgdir}/usr/${_target}/bin/${_file##*"${_target}-"}"
+ done < <(find "${pkgdir}/usr/bin" -type f -print0)
}