Blame SOURCES/jffi-fix-compilation-flags.patch

7c4f10
--- jni/GNUmakefile.orig	2015-03-02 23:35:21.000000000 +0200
7c4f10
+++ jni/GNUmakefile	2015-04-30 18:16:46.270806239 +0300
7c4f10
@@ -66,9 +66,9 @@ OFLAGS = -O2 $(JFLAGS)
7c4f10
 # MacOS headers aren't completely warning free, so turn them off
7c4f10
 WERROR = -Werror
7c4f10
 ifneq ($(OS),darwin)
7c4f10
-  WFLAGS += -Wundef $(WERROR)
7c4f10
+  WFLAGS += -Wundef
7c4f10
 endif
7c4f10
-WFLAGS += -W -Wall -Wno-unused -Wno-parentheses -Wno-unused-parameter
7c4f10
+WFLAGS += -W -Wall -Wno-parentheses -Wno-unused-parameter
7c4f10
 PICFLAGS = -fPIC
7c4f10
 SOFLAGS = # Filled in for each OS specifically
7c4f10
 FFI_MMAP_EXEC = -DFFI_MMAP_EXEC_WRIT
7c4f10
@@ -76,11 +76,13 @@ FFI_MMAP_EXEC = -DFFI_MMAP_EXEC_WRIT
7c4f10
 FFI_CC = $(CCACHE) $(CC)
7c4f10
 FFI_LD = $(LD)
7c4f10
 FFI_CFLAGS = $(FFI_MMAP_EXEC) $(OFLAGS)
7c4f10
-STRIP ?= strip -S
7c4f10
+STRIP ?= /bin/true
7c4f10
+
7c4f10
+RPMFLAGS=$(shell rpm --eval %optflags)
7c4f10
 
7c4f10
 JDK_INCLUDES = -I"$(JDK_HOME)/include" -I"$(JDK_HOME)/include/$(OS)"
7c4f10
 IFLAGS = -I"$(BUILD_DIR)" -I"$(BUILD_DIR)"/jni -I$(SRC_DIR) -I"$(JFFI_SRC_DIR)"
7c4f10
-CFLAGS += $(OFLAGS) $(WFLAGS) $(IFLAGS) $(PICFLAGS) $(JDK_INCLUDES) $(LIBFFI_CFLAGS)
7c4f10
+CFLAGS += $(OFLAGS) $(WFLAGS) $(IFLAGS) $(PICFLAGS) $(JDK_INCLUDES) $(LIBFFI_CFLAGS) $(RPMFLAGS)
7c4f10
 CFLAGS += -D_REENTRANT -D_LARGEFILE64_SOURCE -D_GNU_SOURCE
7c4f10
 
7c4f10
 ifeq ($(OS), win64)