commit 228c942fdea1046dd0c60145c377b7678e571580 Author: Jan Palus <at...@pld-linux.org> Date: Wed Feb 9 00:28:16 2022 +0100
make sure build system does not override opt flags no_optflags.patch | 45 +++++++++++++++++++++++++++++++++++++++++++++ openjdk11.spec | 8 +++----- 2 files changed, 48 insertions(+), 5 deletions(-) --- diff --git a/openjdk11.spec b/openjdk11.spec index e7ced1f..f546dc9 100644 --- a/openjdk11.spec +++ b/openjdk11.spec @@ -34,6 +34,7 @@ Source0: https://github.com/openjdk/jdk11u/archive/jdk-%{version}-ga/%{name}-%{v Source10: make-cacerts.sh Patch0: libpath.patch Patch1: x32.patch +Patch2: no_optflags.patch URL: http://openjdk.java.net/ BuildRequires: /usr/bin/jar BuildRequires: alsa-lib-devel @@ -347,6 +348,7 @@ Przykłady dla OpenJDK. %patch0 -p1 %patch1 -p1 +%patch2 -p1 %build # Make sure we have /proc mounted - otherwise idlc will fail later. @@ -406,11 +408,7 @@ EOF [ -L tmp-bin ] || ln -s "$specdir/jdk/bin" tmp-bin %{__make} -j1 images \ - LOG=debug \ - # these are normally set when --disable-debug-symbols is not used \ - LIBMANAGEMENT_OPTIMIZATION=LOW \ - LIBHPROF_OPTIMIZATION=LOW \ - LIBVERIFY_OPTIMIZATION=LOW + LOG=debug # smoke test tmp-bin/java -version diff --git a/no_optflags.patch b/no_optflags.patch new file mode 100644 index 0000000..fbd0637 --- /dev/null +++ b/no_optflags.patch @@ -0,0 +1,45 @@ +--- jdk11u-jdk-11.0.14.1-ga/make/common/NativeCompilation.gmk.orig 2022-02-07 17:26:34.000000000 +0100 ++++ jdk11u-jdk-11.0.14.1-ga/make/common/NativeCompilation.gmk 2022-02-08 02:14:57.986886271 +0100 +@@ -369,13 +369,13 @@ + ifneq ($$(filter %.c, $$($1_FILENAME)), ) + # Compile as a C file + $1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CFLAGS) \ +- $$($1_OPT_CFLAGS) $$($1_CFLAGS) -c ++ $$($1_CFLAGS) -c + $1_COMPILER := $$($$($1_BASE)_CC) + $1_DEP_FLAG := $(C_FLAG_DEPS) + else ifneq ($$(filter %.m, $$($1_FILENAME)), ) + # Compile as an Objective-C file + $1_FLAGS := -x objective-c $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) \ +- $$($1_BASE_CFLAGS) $$($1_OPT_CFLAGS) $$($1_CFLAGS) -c ++ $$($1_BASE_CFLAGS) $$($1_CFLAGS) -c + $1_COMPILER := $$($$($1_BASE)_CC) + $1_DEP_FLAG := $(C_FLAG_DEPS) + else ifneq ($$(filter %.s %.S, $$($1_FILENAME)), ) +@@ -386,7 +386,7 @@ + else ifneq ($$(filter %.cpp %.cc %.mm, $$($1_FILENAME)), ) + # Compile as a C++ or Objective-C++ file + $1_FLAGS := $(CFLAGS_CCACHE) $$($1_USE_PCH_FLAGS) $$($1_BASE_CXXFLAGS) \ +- $$($1_OPT_CXXFLAGS) $$($1_CXXFLAGS) -c ++ $$($1_CXXFLAGS) -c + $1_COMPILER := $$($$($1_BASE)_CXX) + $1_DEP_FLAG := $(CXX_FLAG_DEPS) + else +@@ -793,7 +793,7 @@ + # lines for all object files in this setup. This includes at least all the + # variables used in the call to add_native_source below. + $1_COMPILE_VARDEPS := $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \ +- $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_OPT_CFLAGS) $$($1_OPT_CXXFLAGS) \ ++ $$($1_CXXFLAGS) $$($1_EXTRA_CXXFLAGS) \ + $$($1_CC) $$($1_CXX) $$($1_AS) $$($1_ASFLAGS) + $1_COMPILE_VARDEPS_FILE := $$(call DependOnVariable, $1_COMPILE_VARDEPS, \ + $$($1_OBJECT_DIR)/$$($1_NOSUFFIX).comp.vardeps) +@@ -838,7 +838,7 @@ + -include $$($1_PCH_DEPS_TARGETS_FILE) + + $1_PCH_COMMAND := $$($1_CC) $$($1_CFLAGS) $$($1_EXTRA_CFLAGS) $$($1_SYSROOT_CFLAGS) \ +- $$($1_OPT_CFLAGS) -x c++-header -c $(C_FLAG_DEPS) \ ++ -x c++-header -c $(C_FLAG_DEPS) \ + $$(addsuffix .tmp, $$($1_PCH_DEPS_FILE)) + + $$($1_PCH_FILE): $$($1_PRECOMPILED_HEADER) $$($1_COMPILE_VARDEPS_FILE) ================================================================ ---- gitweb: http://git.pld-linux.org/gitweb.cgi/packages/openjdk11.git/commitdiff/228c942fdea1046dd0c60145c377b7678e571580 _______________________________________________ pld-cvs-commit mailing list pld-cvs-commit@lists.pld-linux.org http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit