void-packages/srcpkgs/openjdk8/patches/999-native-no-sysroot.patch

27 lines
956 B
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.
--- a/make/common/NativeCompilation.gmk
+++ b/make/common/NativeCompilation.gmk
@@ -384,10 +384,6 @@
$$(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), \
@@ -433,8 +429,6 @@
$1_EXTRA_LDFLAGS += $(call SET_SHARED_LIBRARY_MAPFILE,$$($1_REAL_MAPFILE))
endif
- $1_EXTRA_LDFLAGS += $(SYSROOT_LDFLAGS)
-
# Need to make sure TARGET is first on list
$1 := $$($1_TARGET)
ifeq ($$($1_STATIC_LIBRARY),)