!355 I5S896: revert-fPIC-and-security-compilation-flag-on x86-32

From: @kuenking111 
Reviewed-by: @jvmboy 
Signed-off-by: @jvmboy
This commit is contained in:
openeuler-ci-bot 2022-09-22 07:34:17 +00:00 committed by Gitee
commit 19bc4dbf6b
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 67 additions and 1 deletions

View File

@ -916,7 +916,7 @@ Provides: java-%{javaver}-%{origin}-accessibility%{?1} = %{epoch}:%{version}-%{r
Name: java-%{javaver}-%{origin}
Version: %{javaver}.%{updatever}.%{buildver}
Release: 11
Release: 12
# java-1.5.0-ibm from jpackage.org set Epoch to 1 for unknown reasons
# and this change was brought into RHEL-4. java-1.5.0-ibm packages
# also included the epoch in their virtual provides. This created a
@ -1147,6 +1147,7 @@ Patch257: 8200332-Improve-GCM-counting.patch
Patch258: dynamic-cds-_header-and-_fd-handles-are-not-free.patch
Patch259: fix-dumped-heap-using-jhat-parsing-to-appear-failed-to-resolve-object-id-warning-message.patch
Patch260: 8159720-Failure-of-C2-compilation-with-tiered-preven.patch
Patch261: revert-fPIC-and-security-compilation-flag-on.patch
#############################################
#
@ -1208,6 +1209,7 @@ BuildRequires: cups-devel
BuildRequires: desktop-file-utils
# elfutils only are OK for build without AOT
BuildRequires: elfutils-devel
BuildRequires: elfutils-extra
BuildRequires: fontconfig-devel
BuildRequires: freetype-devel
BuildRequires: giflib-devel
@ -1634,6 +1636,7 @@ pushd %{top_level_dir_name}
%patch258 -p1
%patch259 -p1
%patch260 -p1
%patch261 -p1
popd
# System library fixes
@ -2258,6 +2261,9 @@ cjc.mainProgram(arg)
%endif
%changelog
* Wed Sep 21 2022 kuenking111<wangkun49@huawei.com> - 1:1.8.0.342-b07.12
- add revert-fPIC-and-security-compilation-flag-on.patch
* Mon Sep 19 2022 zhoulei<zhoulei103@huawei.com> - 1:1.8.0.342-b07.11
- add 8159720-Failure-of-C2-compilation-with-tiered-preven.patch

View File

@ -0,0 +1,60 @@
From 9ffc530e0d34086e68c87306ca0410e5847812d6 Mon Sep 17 00:00:00 2001
Date: Wed, 21 Sep 2022 09:53:14 +0800
Subject: revert fPIC and security compilation flag on
---
common/autoconf/flags.m4 | 6 +-----
common/autoconf/generated-configure.sh | 6 +-----
hotspot/make/pic.make | 2 +-
3 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/common/autoconf/flags.m4 b/common/autoconf/flags.m4
index 69bea78d..71703a15 100644
--- a/common/autoconf/flags.m4
+++ b/common/autoconf/flags.m4
@@ -807,11 +807,7 @@ AC_DEFUN_ONCE([FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK],
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
- # Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
- # java heap.
- if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
- LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
- fi
+ LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
fi
fi
AC_SUBST(LDFLAGS_JDKLIB)
diff --git a/common/autoconf/generated-configure.sh b/common/autoconf/generated-configure.sh
index f0e49f50..53e6cf18 100644
--- a/common/autoconf/generated-configure.sh
+++ b/common/autoconf/generated-configure.sh
@@ -43068,11 +43068,7 @@ $as_echo "$supports" >&6; }
LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Xlinker --allow-shlib-undefined"
fi
if test "x$TOOLCHAIN_TYPE" = xgcc; then
- # Enabling pie on 32 bit builds prevents the JVM from allocating a continuous
- # java heap.
- if test "x$OPENJDK_TARGET_CPU_BITS" != "x32"; then
- LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
- fi
+ LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -pie"
fi
fi
diff --git a/hotspot/make/pic.make b/hotspot/make/pic.make
index 0e61ad93..3d85546c 100644
--- a/hotspot/make/pic.make
+++ b/hotspot/make/pic.make
@@ -30,7 +30,7 @@ include $(GAMMADIR)/make/scm.make
ifneq ($(OSNAME), windows)
ifndef LP64
- PARTIAL_NONPIC=1
+ PARTIAL_NONPIC=0
endif
PIC_ARCH = ppc arm
ifneq ("$(filter $(PIC_ARCH),$(BUILDARCH))","")
--
2.22.0