Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37890364
en ru br
ALT Linux repos
S:1.3.4-alt1_1jpp11

Group :: System/Libraries
RPM: jffi

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0002-Fix-compilation-flags.patch
Download


From 877c705bdf888e10a13ed546e423c5f7d2967bf5 Mon Sep 17 00:00:00 2001
From: Mat Booth <mat.booth@redhat.com>
Date: Fri, 31 Jul 2020 13:53:48 +0100
Subject: [PATCH 2/3] Fix compilation flags
---
 jni/GNUmakefile | 10 ++++++----
 pom.xml         |  4 ++++
 2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/jni/GNUmakefile b/jni/GNUmakefile
index b2ff98e..884564f 100755
--- a/jni/GNUmakefile
+++ b/jni/GNUmakefile
@@ -67,10 +67,10 @@ OFLAGS = -O2 $(JFLAGS)
 WERROR = -Werror
 ifneq ($(OS),darwin)
 ifneq ($(OS),aix)
-  WFLAGS += -Wundef $(WERROR)
+  WFLAGS += -Wundef
 endif
 endif
-WFLAGS += -W -Wall -Wno-unused -Wno-parentheses -Wno-unused-parameter
+WFLAGS += -W -Wall -Wno-parentheses -Wno-unused-parameter
 PICFLAGS = -fPIC
 SOFLAGS = # Filled in for each OS specifically
 FFI_MMAP_EXEC = -DFFI_MMAP_EXEC_WRIT
@@ -78,11 +78,13 @@ FFI_MMAP_EXEC = -DFFI_MMAP_EXEC_WRIT
 FFI_CC = $(CCACHE) $(CC)
 FFI_LD = $(LD)
 FFI_CFLAGS = $(FFI_MMAP_EXEC) $(OFLAGS)
-STRIP ?= strip -S
+STRIP ?= /bin/true
+
+RPMFLAGS=$(shell rpm --eval %optflags)
 
 JDK_INCLUDES = -I"$(JDK_HOME)/include" -I"$(JDK_HOME)/include/$(OS)"
 IFLAGS = -I"$(BUILD_DIR)" -I"$(BUILD_DIR)"/jni -I$(SRC_DIR) -I"$(JFFI_SRC_DIR)"
-CFLAGS += $(OFLAGS) $(WFLAGS) $(IFLAGS) $(PICFLAGS) $(JDK_INCLUDES) $(LIBFFI_CFLAGS)
+CFLAGS += $(OFLAGS) $(WFLAGS) $(IFLAGS) $(PICFLAGS) $(JDK_INCLUDES) $(LIBFFI_CFLAGS) $(RPMFLAGS)
 CFLAGS += -D_REENTRANT -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
 
 ifeq ($(OS), win64)
diff --git a/pom.xml b/pom.xml
index 682e0ba..e50a874 100644
--- a/pom.xml
+++ b/pom.xml
@@ -271,6 +271,10 @@
                             <include name="**/*.jar" />
                           </fileset>
                       </unzip>
+                      <exec executable="/bin/sh">
+                        <arg value="-c"/>
+                        <arg value="strip -s ${project.build.directory}/jni/*/*.so"/>
+                      </exec>
                     </tasks>
                 </configuration>
             </execution>
-- 
2.31.1
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin