29 lines
1.1 KiB
Diff
29 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.
|