From e39964f4d9a274e50a1df26f13fcb5c13a515a9f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=B2=D1=8F=D1=82=D0=BE=D1=81=D0=BB=D0=B0=D0=B2?= Date: Sun, 17 Jan 2021 21:09:04 +0000 Subject: [PATCH] "error __PIC__ level differs in PCH file vs. current file" add flag -fno-PIC ix86 --- java-11-openjdk.spec | 3 +++ 1 file changed, 3 insertions(+) diff --git a/java-11-openjdk.spec b/java-11-openjdk.spec index 8a31304..cdfa14e 100644 --- a/java-11-openjdk.spec +++ b/java-11-openjdk.spec @@ -146,6 +146,9 @@ # We filter out -Wall which will otherwise cause HotSpot to produce hundreds of thousands of warnings (100+mb logs) # We replace it with -Wformat (required by -Werror=format-security) and -Wno-cpp to avoid FORTIFY_SOURCE warnings # We filter out -fexceptions as the HotSpot build explicitly does -fno-exceptions and it's otherwise the default for C++ +%ifarch %{ix86} +%global optflags %optflags -fno-PIC +%endif %global ourflags %(echo %optflags | sed -e 's|-Wall|-Wformat -Wno-cpp|' | sed -r -e 's|-O[0-9]*||') %global ourcppflags %(echo %ourflags | sed -e 's|-fexceptions||')