termux-packages/packages/openjdk-17/always-compile-with-pic.patch

55 lines
2.8 KiB
Diff

From 5008b7a048d43c6b39b37ceb082df55b99d05734 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=BA=AF=E6=B4=84?= <1840686745@qq.com>
Date: Thu, 26 Aug 2021 14:00:54 +0800
Subject: [PATCH] Always compile with PIC
---
make/hotspot/lib/JvmOverrideFiles.gmk | 34 +++++++++++++--------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/make/hotspot/lib/JvmOverrideFiles.gmk b/make/hotspot/lib/JvmOverrideFiles.gmk
index a9f8a0e54ed..4716fe3f86a 100644
--- a/make/hotspot/lib/JvmOverrideFiles.gmk
+++ b/make/hotspot/lib/JvmOverrideFiles.gmk
@@ -65,23 +65,23 @@ ifeq ($(call isTargetOs, linux), true)
#
endif
- ifeq ($(call isTargetCpu, x86), true)
- # Performance measurements show that by compiling GC related code, we could
- # significantly reduce the GC pause time on 32 bit Linux/Unix platforms by
- # compiling without the PIC flag (-fPIC on linux).
- # See 6454213 for more details.
- ALL_SRC := $(call FindFiles, $(TOPDIR)/src/hotspot/share, *.cpp)
- NONPIC_FILTER := $(addsuffix %, $(addprefix $(TOPDIR)/src/hotspot/share/, \
- memory oops gc))
- # Due to what looks like a bug in the old build implementation of this, add a
- # couple of more files that were accidentally matched as substrings of GC related
- # files.
- NONPIC_SRC := $(filter $(NONPIC_FILTER), $(ALL_SRC)) globals.cpp location.cpp
- # Declare variables for each source file that needs the pic flag like this:
- # BUILD_JVM_<srcfile>_CXXFLAGS := -fno-PIC
- # This will get implicitly picked up by SetupNativeCompilation below.
- $(foreach s, $(NONPIC_SRC), $(eval BUILD_LIBJVM_$(notdir $s)_CXXFLAGS := -fno-PIC))
- endif
+ # ifeq ($(call isTargetCpu, x86), true)
+ # # Performance measurements show that by compiling GC related code, we could
+ # # significantly reduce the GC pause time on 32 bit Linux/Unix platforms by
+ # # compiling without the PIC flag (-fPIC on linux).
+ # # See 6454213 for more details.
+ # ALL_SRC := $(call FindFiles, $(TOPDIR)/src/hotspot/share, *.cpp)
+ # NONPIC_FILTER := $(addsuffix %, $(addprefix $(TOPDIR)/src/hotspot/share/, \
+ # memory oops gc))
+ # # Due to what looks like a bug in the old build implementation of this, add a
+ # # couple of more files that were accidentally matched as substrings of GC related
+ # # files.
+ # NONPIC_SRC := $(filter $(NONPIC_FILTER), $(ALL_SRC)) globals.cpp location.cpp
+ # # Declare variables for each source file that needs the pic flag like this:
+ # # BUILD_JVM_<srcfile>_CXXFLAGS := -fno-PIC
+ # # This will get implicitly picked up by SetupNativeCompilation below.
+ # $(foreach s, $(NONPIC_SRC), $(eval BUILD_LIBJVM_$(notdir $s)_CXXFLAGS := -fno-PIC))
+ # endif
else ifeq ($(call isTargetOs, macosx), true)
# The copied fdlibm routines in these files must not be optimized