openjdk: add required patches

This commit is contained in:
Fabian Kosmale 2015-03-08 17:24:18 +00:00
parent 5748817cf3
commit 116f8f4aad
2 changed files with 49 additions and 3 deletions

View File

@ -32,6 +32,7 @@ source=(jdk8u-${_repo_ver}.tar.gz::${_url_src}/archive/${_repo_ver}.tar.gz
nashorn-${_repo_ver}.tar.gz::${_url_src}/nashorn/archive/${_repo_ver}.tar.gz
openjdk.profile.sh
openjdk.profile.csh
make4-compatibility.diff
giflib5.diff)
md5sums=('c689ebe46c1d18bb20e5a4d2bd51aefc'
'5c96879a168c79647fb7b0285c51b5ac'
@ -43,6 +44,7 @@ md5sums=('c689ebe46c1d18bb20e5a4d2bd51aefc'
'abb8cbd2a4fce317174d60bf543c8ce4'
'65fecbcbadfa455f35cb6fef7d1fc553'
'b839efffcbdb4f630b52d92ee1565c90'
'87eb620b7813f6f843ad6491239ceb66'
'86b2c5980594a977333a128c0e288bd6')
_jdkname=openjdk8
@ -62,9 +64,13 @@ prepare() {
ln -sf ../${subrepo}-${_repo_ver} ${subrepo}
done
#Fix the giflib5 issues with splashscreen_gif.c
cd "${srcdir}/jdk8u-jdk8u40-b19/jdk/src/share/native/sun/awt/splashscreen"
patch -N -i "${srcdir}/giflib5.diff"
#Fix the giflib5 issues with splashscreen_gif.c, kind regards to the Beyond LFS team
cd "${srcdir}/"
sed -e 's/DGifCloseFile(gif/&, NULL/' \
-e '/DGifOpen/s/c)/c, NULL)/' \
-i ./jdk-jdk8u40-b19/src/share/native/sun/awt/splashscreen/splashscreen_gif.c
cd jdk8u-jdk8u40-b19
patch -p1 -i ${srcdir}/make4-compatibility.diff
}

View File

@ -0,0 +1,40 @@
# DP: Fix hotspot build system for GNU make 4.0.
Description: Fixes a bug in adjust-mflags.sh that breaks the hotspot build
with GNU make 4.0. The adjust-mflags.sh script attempts to replace
the -j parameter but it corrupts other parameters containing the character 'j'.
make 4.0 is more strict and returns an error in this case.
For example:
-I/home/ebourg/openjdk8/make/common
is transformed into:
-I/home/ebourg/open -j2 -dk8/make/common
This error is caused by this sed expression:
s/ -\([^ ][^ ]*\)j/ -\1 -j/
This expression splits a set of concatenated options containing the 'j' character:
-abcdefghijkl --> -abcdefghi -jkl
But it breaks the -I parameter which is followed by a path that may contain 'j'
(and this is often true when building open*j*dk)
The fix consists in ignoring the concatenated options if '/' is found.
Author: Emmanuel Bourg <ebourg@apache.org>
Bug: https://bugs.openjdk.java.net/browse/JDK-8028407
--- a/hotspot/make/linux/makefiles/adjust-mflags.sh
+++ b/hotspot/make/linux/makefiles/adjust-mflags.sh
@@ -64,7 +64,7 @@
echo "$MFLAGS" \
| sed '
s/^-/ -/
- s/ -\([^ I][^ I]*\)j/ -\1 -j/
+ s/ -\([^ I][^/ I]*\)j/ -\1 -j/
s/ -j[0-9][0-9]*/ -j/
s/ -j\([^ ]\)/ -j -\1/
s/ -j/ -j'${HOTSPOT_BUILD_JOBS:-${default_build_jobs}}'/