void-packages/srcpkgs/openjdk8/patches/999-native-no-sysroot.patch
q66 6783ab9f47 openjdk: update to 8u232b09, rename to openjdk8, native bootstrap
This updates OpenJDK 8 to a newer version and brings a bunch of
changes.

Newly, it is bootstrapped with openjdk7-bootstrap, so it does not
need to download binaries. It can also cross-compile and is patched
for musl and other platforms.

We're newly using the aarch64 port repo in order to get aarch64
JIT. For non-aarch64 platforms, the codebase is the same.

The symlink for /usr/lib/jvm/openjdk is also now gone and we're
using a unified java-VERSION-VENDOR naming.

Also general template cleanup.

[ci skip]
2019-11-24 16:33:30 -05:00

28 lines
1.1 KiB
Diff

By default, OpenJDK 8 passes sysroot flags to native compiler. This is wrong,
as it will then use target include files when calling the native compiler.
Newer versions of OpenJDK have seemingly fixed this, 8 has not.
diff --git a/make/common/NativeCompilation.gmk b/make/common/NativeCompilation.gmk
index d961cf3..9679f97 100644
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -383,10 +383,6 @@ define SetupNativeCompilation
$$(error Unknown value for OPTIMIZATION: $$($1_OPTIMIZATION))
endif
- # Add sys root specific cflags last
- $1_EXTRA_CFLAGS += $(SYSROOT_CFLAGS)
- $1_EXTRA_CXXFLAGS += $(SYSROOT_CFLAGS)
-
# Now call add_native_source for each source file we are going to compile.
$$(foreach p,$$($1_SRCS), \
$$(eval $$(call add_native_source,$1,$$p,$$($1_OBJECT_DIR), \
@@ -432,8 +428,6 @@ define SetupNativeCompilation
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
endif
- $1_EXTRA_LDFLAGS += $(SYSROOT_LDFLAGS)
-
$1 := $$($1_TARGET)
ifneq (,$$($1_LIBRARY))
# Generating a dynamic library.