summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanila Kiver2020-05-30 02:23:24 +0300
committerDanila Kiver2020-05-30 02:23:24 +0300
commit6a2938d1d706226c3206df42ca7ba30a2e25c62d (patch)
tree2e46f8b7cb6dd61168fe1088dd721dc393be65e9
parent23fa3f62de188bbe2e6183c3d54247d07c0e10f2 (diff)
downloadaur-6a2938d1d706226c3206df42ca7ba30a2e25c62d.tar.gz
Bump binutils version to 2.34.
There is a breaking change in API used by hsdis: to be able to handle a corner case, the bfd_octets_per_byte function now accepts one more argument (the section). Given that hsdis uses only a fake binfd to obtain some machine-specific parameters, there is no need in this parameter, and it can just be NULLed.
-rw-r--r--.SRCINFO8
-rw-r--r--PKGBUILD16
-rw-r--r--binutils-compat.patch12
3 files changed, 29 insertions, 7 deletions
diff --git a/.SRCINFO b/.SRCINFO
index b0ede757992e..91c02261baad 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,15 +1,17 @@
pkgbase = java8-openjdk-hsdis
pkgdesc = Disassembler for HotSpot
pkgver = 8.u242
- pkgrel = 1
+ pkgrel = 2
url = http://openjdk.java.net/
arch = i686
arch = x86_64
license = GPL2
source = hotspot-jdk8u242-b08.tar.gz::http://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/archive/jdk8u242-b08.tar.gz
- source = http://ftp.gnu.org/gnu/binutils/binutils-2.31.tar.bz2
+ source = http://ftp.gnu.org/gnu/binutils/binutils-2.34.tar.bz2
+ source = binutils-compat.patch
sha256sums = 8b799f2ef8e804110aa6ccd23fc46a04047141f7f8ad32936a6fc66f828b24a2
- sha256sums = 2c49536b1ca6b8900531b9e34f211a81caf9bf85b1a71f82b81ae32fcd8ffe19
+ sha256sums = 89f010078b6cf69c23c27897d686055ab89b198dddf819efb0a4f2c38a0b36e6
+ sha256sums = 1ce6f6dccf01aa7172f2a600384244ac7bc91a9cf1bcaa0a9d4e453c775357f5
pkgname = java8-openjdk-hsdis
diff --git a/PKGBUILD b/PKGBUILD
index a8654efa3562..c4a5e90d03c9 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -5,19 +5,21 @@ pkgname=java8-openjdk-hsdis
_java_ver=8
_jdk_update=242
_jdk_build=08
-_binutils_ver=2.31
+_binutils_ver=2.34
pkgver=${_java_ver}.u${_jdk_update}
_repo_ver=jdk${_java_ver}u${_jdk_update}-b${_jdk_build}
-pkgrel=1
+pkgrel=2
pkgdesc="Disassembler for HotSpot"
arch=('i686' 'x86_64')
url='http://openjdk.java.net/'
license=('GPL2')
_url_src=http://hg.openjdk.java.net/jdk8u/jdk8u
source=(hotspot-${_repo_ver}.tar.gz::${_url_src}/hotspot/archive/${_repo_ver}.tar.gz
- http://ftp.gnu.org/gnu/binutils/binutils-${_binutils_ver}.tar.bz2)
+ http://ftp.gnu.org/gnu/binutils/binutils-${_binutils_ver}.tar.bz2
+ binutils-compat.patch)
sha256sums=('8b799f2ef8e804110aa6ccd23fc46a04047141f7f8ad32936a6fc66f828b24a2'
- '2c49536b1ca6b8900531b9e34f211a81caf9bf85b1a71f82b81ae32fcd8ffe19')
+ '89f010078b6cf69c23c27897d686055ab89b198dddf819efb0a4f2c38a0b36e6'
+ '1ce6f6dccf01aa7172f2a600384244ac7bc91a9cf1bcaa0a9d4e453c775357f5')
prepare() {
cd "${srcdir}/binutils-${_binutils_ver}"
@@ -28,6 +30,12 @@ prepare() {
cd "${srcdir}/hotspot-${_repo_ver}/src/share/tools/hsdis"
mkdir -p build
ln -sf "${srcdir}/binutils-${_binutils_ver}" build/binutils
+
+ # The upstream is currently stuck with binutils 2.31. This patch provides the
+ # compatibility with least recent binutils versions. Remove it once the upstream
+ # updates the binutils version in use.
+ cd "${srcdir}/hotspot-${_repo_ver}"
+ patch -N -p 1 -i "${srcdir}/binutils-compat.patch"
}
build() {
diff --git a/binutils-compat.patch b/binutils-compat.patch
new file mode 100644
index 000000000000..a9092ab495b3
--- /dev/null
+++ b/binutils-compat.patch
@@ -0,0 +1,12 @@
+diff --unified --color --unified --recursive --text --color hotspot-jdk8u242-b08/src/share/tools/hsdis/hsdis.c hotspot-jdk8u242-b08-new/src/share/tools/hsdis/hsdis.c
+--- hotspot-jdk8u242-b08/src/share/tools/hsdis/hsdis.c 2020-01-13 07:58:01.000000000 +0300
++++ hotspot-jdk8u242-b08-new/src/share/tools/hsdis/hsdis.c 2020-05-25 03:00:51.426052437 +0300
+@@ -557,7 +557,7 @@
+ dinfo->arch = bfd_get_arch(abfd);
+ dinfo->mach = bfd_get_mach(abfd);
+ dinfo->disassembler_options = disassembler_options;
+- dinfo->octets_per_byte = bfd_octets_per_byte (abfd);
++ dinfo->octets_per_byte = bfd_octets_per_byte (abfd, NULL);
+ dinfo->skip_zeroes = sizeof(void*) * 2;
+ dinfo->skip_zeroes_at_end = sizeof(void*)-1;
+ dinfo->disassembler_needs_relocs = FALSE;