summaryrefslogtreecommitdiffstats
path: root/recipes-core/openjdk/patches-openjdk-8/0003-jdk-Allow-using-a-system-installed-libjpeg.patch
diff options
context:
space:
mode:
authorRichard Leitner <richard.leitner@skidata.com>2019-12-30 15:35:59 +0100
committerRichard Leitner <richard.leitner@skidata.com>2020-01-28 15:09:31 +0100
commit7d30e6ff7b8a54d67256ce528e8c4fd7e63f6b14 (patch)
tree398a12e3addb7470622d4cb2f98e7ad2dda02c5c /recipes-core/openjdk/patches-openjdk-8/0003-jdk-Allow-using-a-system-installed-libjpeg.patch
parent19b569281cc30e3aa94e772d6885cd340b1d1724 (diff)
downloadmeta-java-7d30e6ff7b8a54d67256ce528e8c4fd7e63f6b14.tar.gz
openjdk-8: update to latest ga version 242
As OpenJDK-8 is now tagging "ga" versions in addition to the "build" version the recipes are adapted to use those "ga" versions. All existing patches got re-applied and renamed. For better handling Hotspot patches now start at patch number 1001 and jdk patches at 2001. Furthermore architecture dependent patches are prefixed with the architecture they apply on. Following patches/hunks were completely dropped: - 0002-hotspot-fix-compilation-with-security-flags-enabled.patch got backported to hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/c40a28e54185 - 0011-hotspot-backport-patch-to-fix-misuses-of-strncpy-str.patch ostream.cpp:112 got fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f3108e56b502 - 0014-hotspot-zero-fix-undefined-behaviour-gcc-v8-fix.patch got backported to hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/ca4663e58916 - 0018-hotspot-Fix-debug-build-after-8062808-Turn-on-the-Wr.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/32bc598624bd - 0020-Enable-HotSpot-builds-on-5.x-Linux-kernels.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/5af8ec63c21c - openjdk8-add-missing-linker-flags.patch fixed in hotspot jdk8u https://hg.openjdk.java.net/jdk8u/jdk8u/hotspot/rev/f175513c2c3a - openjdk8-fix-shark-stdc++11.patch fixed in hotspot jdk8u - openjdk8-fix-libpng-neon-build.patch fixed in jdk https://hg.openjdk.java.net/jdk8u/jdk8u/jdk/rev/5d57817931e1 - aarch64-hotspot-fix-undefined-behaviour-gcc-v8-fix.patch got backported to hotspot jdk8u Following patches were newly added: - 0011-autoconf-fix-CC-with-arguments-detection.patch needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris" - 0012-autoconf-NativeCompilation-remove-sysroot.patch needed because of jdk8u commit "8038340: Cleanup and fix sysroot and devkit handling on Linux and Solaris" Additionally add UPDATING.md which describes the openjdk8 update process for this layer and update8checksums.sh, a script that updates the openjdk8 source archive checksums in the corresponding .inc files. Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
Diffstat (limited to 'recipes-core/openjdk/patches-openjdk-8/0003-jdk-Allow-using-a-system-installed-libjpeg.patch')
-rw-r--r--recipes-core/openjdk/patches-openjdk-8/0003-jdk-Allow-using-a-system-installed-libjpeg.patch262
1 files changed, 0 insertions, 262 deletions
diff --git a/recipes-core/openjdk/patches-openjdk-8/0003-jdk-Allow-using-a-system-installed-libjpeg.patch b/recipes-core/openjdk/patches-openjdk-8/0003-jdk-Allow-using-a-system-installed-libjpeg.patch
deleted file mode 100644
index e189278..0000000
--- a/recipes-core/openjdk/patches-openjdk-8/0003-jdk-Allow-using-a-system-installed-libjpeg.patch
+++ /dev/null
@@ -1,262 +0,0 @@
1From a6746c1ee43a63e79b5405e40c463d00160bc02e Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <andre.draszik@jci.com>
3Date: Tue, 27 Feb 2018 13:36:53 +0000
4Subject: [PATCH 3/9] jdk: Allow using a system-installed libjpeg
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Patch stolen (and some typos corrected) from debian patch,
10which itself was a backport from:
11 http://hg.openjdk.java.net/jdk9/client/rev/bfd9a3e1aeb5
12 http://hg.openjdk.java.net/jdk9/client/jdk/rev/320743f0b4fc
13
14Issues fixed on top of debian patch:
15 * imageIOJPEG.c -> imageioJPEG.c
16 * $(LIBJPEG_LIBS) must be added to LDFLAGS_SUFFIX, not
17 LDFLAGS as it otherwise doesn't make it into the linker
18 command line and then fails when using -Wl,-z,now in
19 LDFLAGS (as done when 'security' is enabled)
20
21Upstream-Status: Backport
22Signed-off-by: André Draszik <andre.draszik@jci.com>
23---
24 common/autoconf/libraries.m4 | 35 +++++++++--
25 jdk/make/lib/Awt2dLibraries.gmk | 69 +++++++++++++++-------
26 .../sun/imageio/plugins/jpeg/JPEGImageReader.java | 2 +-
27 .../sun/imageio/plugins/jpeg/JPEGImageWriter.java | 2 +-
28 .../classes/sun/awt/image/JPEGImageDecoder.java | 2 +-
29 .../share/native/sun/awt/image/jpeg/imageioJPEG.c | 2 +-
30 6 files changed, 81 insertions(+), 31 deletions(-)
31
32diff --git a/common/autoconf/libraries.m4 b/common/autoconf/libraries.m4
33index 91b8ed7f..3f5f69b1 100644
34--- a/common/autoconf/libraries.m4
35+++ b/common/autoconf/libraries.m4
36@@ -595,11 +595,36 @@ AC_DEFUN_ONCE([LIB_SETUP_MISC_LIBS],
37 # Check for the jpeg library
38 #
39
40- USE_EXTERNAL_LIBJPEG=true
41- AC_CHECK_LIB(jpeg, main, [],
42- [ USE_EXTERNAL_LIBJPEG=false
43- AC_MSG_NOTICE([Will use jpeg decoder bundled with the OpenJDK source])
44- ])
45+ AC_ARG_WITH(libjpeg, [AS_HELP_STRING([--with-libjpeg],
46+ [use libjpeg from build system or OpenJDK source (system, bundled) @<:@bundled@:>@])])
47+
48+ AC_MSG_CHECKING([for which libjpeg to use])
49+
50+ # default is bundled
51+ DEFAULT_LIBJPEG=bundled
52+
53+ #
54+ # if user didn't specify, use DEFAULT_LIBJPEG
55+ #
56+ if test "x${with_libjpeg}" = "x"; then
57+ with_libjpeg=${DEFAULT_LIBJPEG}
58+ fi
59+
60+ AC_MSG_RESULT(${with_libjpeg})
61+
62+ if test "x${with_libjpeg}" = "xbundled"; then
63+ USE_EXTERNAL_LIBJPEG=false
64+ elif test "x${with_libjpeg}" = "xsystem"; then
65+ AC_CHECK_HEADER(jpeglib.h, [],
66+ [ AC_MSG_ERROR([--with-libjpeg=system specified, but jpeglib.h not found!])])
67+ AC_CHECK_LIB(jpeg, jpeg_CreateDecompress, [],
68+ [ AC_MSG_ERROR([--with-libjpeg=system specified, but no libjpeg found])])
69+
70+ USE_EXTERNAL_LIBJPEG=true
71+ else
72+ AC_MSG_ERROR([Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'])
73+ fi
74+
75 AC_SUBST(USE_EXTERNAL_LIBJPEG)
76
77 ###############################################################################
78diff --git a/jdk/make/lib/Awt2dLibraries.gmk b/jdk/make/lib/Awt2dLibraries.gmk
79index aa7efc4a..8872a8e8 100644
80--- a/jdk/make/lib/Awt2dLibraries.gmk
81+++ b/jdk/make/lib/Awt2dLibraries.gmk
82@@ -707,21 +707,24 @@ $(BUILD_LIBLCMS): $(BUILD_LIBAWT)
83
84 ##########################################################################################
85
86+BUILD_LIBJAVAJPEG_DIR := $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg
87+
88 ifdef OPENJDK
89- BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers
90+ BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers
91 else
92- BUILD_LIBJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers-closed
93- BUILD_LIBJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
94- BUILD_LIBJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJPEG_CLOSED_SRC)
95+ BUILD_LIBJAVAJPEG_MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libjpeg/mapfile-vers-closed
96+ BUILD_LIBJAVAJPEG_CLOSED_SRC := $(JDK_TOPDIR)/src/closed/share/native/sun/awt/image/jpeg
97+ BUILD_LIBJAVAJPEG_CLOSED_INCLUDES := -I$(BUILD_LIBJAVAJPEG_CLOSED_SRC)
98 endif
99
100-BUILD_LIBJPEG_REORDER :=
101+BUILD_LIBJAVAJPEG_REORDER :=
102 ifeq ($(OPENJDK_TARGET_OS), solaris)
103 ifneq ($(OPENJDK_TARGET_CPU), x86_64)
104- BUILD_LIBJPEG_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
105+ BUILD_LIBJAVAJPEG_REORDER := $(JDK_TOPDIR)/make/mapfiles/libjpeg/reorder-$(OPENJDK_TARGET_CPU)
106 endif
107 endif
108
109+
110 # Suppress gcc warnings like "variable might be clobbered by 'longjmp'
111 # or 'vfork'": this warning indicates that some variable is placed to
112 # a register by optimized compiler and it's value might be lost on longjmp().
113@@ -733,37 +736,50 @@ endif
114 # $(shell $(EXPR) $(CC_MAJORVER) \> 4 \| \
115 # \( $(CC_MAJORVER) = 4 \& $(CC_MINORVER) \>= 3 \) )
116 # ifeq ($(CC_43_OR_NEWER), 1)
117-# BUILD_LIBJPEG_CFLAGS_linux += -Wno-clobbered
118+# BUILD_LIBJAVAJPEG_CFLAGS_linux += -Wno-clobbered
119 # endif
120 #endif
121
122-$(eval $(call SetupNativeCompilation,BUILD_LIBJPEG, \
123- LIBRARY := jpeg, \
124+ifeq ($(USE_EXTERNAL_LIBJPEG), true)
125+ LIBJPEG_LIBS := -ljpeg
126+ BUILD_LIBJAVAJPEG_INCLUDE_FILES := \
127+ imageioJPEG.c \
128+ jpegdecoder.c
129+ BUILD_LIBJAVAJPEG_HEADERS :=
130+else
131+ LIBJPEG_LIBS :=
132+ BUILD_LIBJAVAJPEG_INCLUDE_FILES :=
133+ BUILD_LIBJAVAJPEG_HEADERS := -I$(BUILD_LIBJAVAJPEG_DIR)
134+endif
135+
136+$(eval $(call SetupNativeCompilation,BUILD_LIBJAVAJPEG, \
137+ LIBRARY := javajpeg, \
138 OUTPUT_DIR := $(INSTALL_LIBRARIES_HERE), \
139- SRC := $(BUILD_LIBJPEG_CLOSED_SRC) \
140- $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
141+ SRC := $(BUILD_LIBJAVAJPEG_CLOSED_SRC) \
142+ $(BUILD_LIBJAVAJPEG_DIR), \
143+ INCLUDE_FILES := $(BUILD_LIBJAVAJPEG_INCLUDE_FILES), \
144 LANG := C, \
145 OPTIMIZATION := HIGHEST, \
146 CFLAGS := $(CFLAGS_JDKLIB) \
147- $(BUILD_LIBJPEG_CLOSED_INCLUDES) \
148- -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg, \
149- MAPFILE := $(BUILD_LIBJPEG_MAPFILE), \
150+ $(BUILD_LIBJAVAJPEG_CLOSED_INCLUDES) \
151+ $(BUILD_LIBJAVAJPEG_HEADERS), \
152+ MAPFILE := $(BUILD_LIBJAVAJPEG_MAPFILE), \
153 LDFLAGS := $(LDFLAGS_JDKLIB) \
154 $(call SET_SHARED_LIBRARY_ORIGIN), \
155 LDFLAGS_windows := $(WIN_JAVA_LIB) jvm.lib, \
156- LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX), \
157+ LDFLAGS_SUFFIX := $(LDFLAGS_JDKLIB_SUFFIX) $(LIBJPEG_LIBS), \
158 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
159 RC_FLAGS := $(RC_FLAGS) \
160- -D "JDK_FNAME=jpeg.dll" \
161- -D "JDK_INTERNAL_NAME=jpeg" \
162+ -D "JDK_FNAME=javajpeg.dll" \
163+ -D "JDK_INTERNAL_NAME=javajpeg" \
164 -D "JDK_FTYPE=0x2L", \
165- REORDER := $(BUILD_LIBJPEG_REORDER), \
166+ REORDER := $(BUILD_LIBJAVAJPEG_REORDER), \
167 OBJECT_DIR := $(JDK_OUTPUTDIR)/objs/libjpeg, \
168 DEBUG_SYMBOLS := $(DEBUG_ALL_BINARIES)))
169
170-$(BUILD_LIBJPEG): $(BUILD_LIBJAVA)
171+$(BUILD_LIBJAVAJPEG): $(BUILD_LIBJAVA)
172
173-BUILD_LIBRARIES += $(BUILD_LIBJPEG)
174+BUILD_LIBRARIES += $(BUILD_LIBJAVAJPEG)
175
176 ##########################################################################################
177
178@@ -1213,6 +1229,13 @@ ifndef BUILD_HEADLESS_ONLY
179 GIFLIB_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/giflib
180 endif
181
182+ ifeq ($(USE_EXTERNAL_LIBJPEG), true)
183+ LIBJPEG_LDFLAGS := -ljpeg
184+ else
185+ LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg
186+ LIBJPEG_CFLAGS := -I$(JDK_TOPDIR)/src/share/native/sun/awt/image/jpeg
187+ endif
188+
189 ifneq ($(OPENJDK_TARGET_OS), macosx)
190 LIBSPLASHSCREEN_DIRS += $(JDK_TOPDIR)/src/$(OPENJDK_TARGET_OS_API_DIR)/native/sun/awt/splashscreen
191 else
192@@ -1273,11 +1296,13 @@ ifndef BUILD_HEADLESS_ONLY
193 EXCLUDE_FILES := imageioJPEG.c jpegdecoder.c pngtest.c, \
194 LANG := C, \
195 OPTIMIZATION := LOW, \
196- CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) $(GIFLIB_CFLAGS), \
197+ CFLAGS := $(LIBSPLASHSCREEN_CFLAGS) $(CFLAGS_JDKLIB) \
198+ $(GIFLIB_CFLAGS) $(LIBJPEG_CFLAGS), \
199 MAPFILE := $(JDK_TOPDIR)/make/mapfiles/libsplashscreen/mapfile-vers, \
200 LDFLAGS := $(LDFLAGS_JDKLIB) \
201 $(call SET_SHARED_LIBRARY_ORIGIN), \
202- LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) $(GIFLIB_LDFLAGS), \
203+ LDFLAGS_SUFFIX := $(LIBSPLASHSCREEN_LDFLAGS_SUFFIX) $(LIBZ) \
204+ $(GIFLIB_LDFLAGS) $(LIBJPEG_LDFLAGS), \
205 LDFLAGS_SUFFIX_solaris := -lc, \
206 VERSIONINFO_RESOURCE := $(JDK_TOPDIR)/src/windows/resource/version.rc, \
207 RC_FLAGS := $(RC_FLAGS) \
208diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java
209index 5c93d89e..5efc00a7 100644
210--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java
211+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageReader.java
212@@ -89,7 +89,7 @@ public class JPEGImageReader extends ImageReader {
213 java.security.AccessController.doPrivileged(
214 new java.security.PrivilegedAction<Void>() {
215 public Void run() {
216- System.loadLibrary("jpeg");
217+ System.loadLibrary("javajpeg");
218 return null;
219 }
220 });
221diff --git a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java
222index 6a33bd5a..dca189ed 100644
223--- a/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java
224+++ b/jdk/src/share/classes/com/sun/imageio/plugins/jpeg/JPEGImageWriter.java
225@@ -177,7 +177,7 @@ public class JPEGImageWriter extends ImageWriter {
226 java.security.AccessController.doPrivileged(
227 new java.security.PrivilegedAction<Void>() {
228 public Void run() {
229- System.loadLibrary("jpeg");
230+ System.loadLibrary("javajpeg");
231 return null;
232 }
233 });
234diff --git a/jdk/src/share/classes/sun/awt/image/JPEGImageDecoder.java b/jdk/src/share/classes/sun/awt/image/JPEGImageDecoder.java
235index 872ffc01..5965a186 100644
236--- a/jdk/src/share/classes/sun/awt/image/JPEGImageDecoder.java
237+++ b/jdk/src/share/classes/sun/awt/image/JPEGImageDecoder.java
238@@ -56,7 +56,7 @@ public class JPEGImageDecoder extends ImageDecoder {
239 java.security.AccessController.doPrivileged(
240 new java.security.PrivilegedAction<Void>() {
241 public Void run() {
242- System.loadLibrary("jpeg");
243+ System.loadLibrary("javajpeg");
244 return null;
245 }
246 });
247diff --git a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
248index 7e1d8c99..8cac61da 100644
249--- a/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
250+++ b/jdk/src/share/native/sun/awt/image/jpeg/imageioJPEG.c
251@@ -51,7 +51,7 @@
252
253 /* headers from the JPEG library */
254 #include <jpeglib.h>
255-#include "jerror.h"
256+#include <jerror.h>
257
258 #undef MAX
259 #define MAX(a,b) ((a) > (b) ? (a) : (b))
260--
2612.16.2
262