0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 13:03:31 +00:00
termux-packages/packages/openjdk-17/0023-x86-always-compile-with-PIC.patch

42 lines
1.8 KiB
Diff

From ab98aadd7953c5d41fad994e82e433d07dfb1885 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] x86: always compile with PIC
---
make/hotspot/lib/JvmOverrideFiles.gmk | 18 ------------------
1 file changed, 18 deletions(-)
diff --git a/make/hotspot/lib/JvmOverrideFiles.gmk b/make/hotspot/lib/JvmOverrideFiles.gmk
index a9f8a0e54ede..2ba0ec0105e8 100644
--- a/make/hotspot/lib/JvmOverrideFiles.gmk
+++ b/make/hotspot/lib/JvmOverrideFiles.gmk
@@ -65,24 +65,6 @@ 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
-
else ifeq ($(call isTargetOs, macosx), true)
# The copied fdlibm routines in these files must not be optimized
BUILD_LIBJVM_sharedRuntimeTrig.cpp_CXXFLAGS := $(FDLIBM_CFLAGS) $(LIBJVM_FDLIBM_COPY_OPT_FLAG)
--
2.44.0