1ae633
From 10c9985d97d4aa3b98f8c83e9892b20aeea08b1c Mon Sep 17 00:00:00 2001
1ae633
From: Petr Lautrbach <plautrba@redhat.com>
1ae633
Date: Thu, 27 Jun 2019 11:17:13 +0200
1ae633
Subject: [PATCH 5/5] libselinux: Do not use SWIG_CFLAGS when Python bindings
1ae633
 are built
1ae633
1ae633
Fixes:
1ae633
1ae633
Detecting usr/lib64/python3.6/site-packages/selinux/audit2why.cpython-36m-x86_64-linux-gnu.so with not-hardened warnings '
1ae633
Hardened: audit2why.cpython-36m-x86_64-linux-gnu.so: FAIL: Gaps were detected in the annobin coverage.  Run with -v to list.
1ae633
' on x86_64
1ae633
1ae633
Signed-off-by: Petr Lautrbach <plautrba@redhat.com>
1ae633
---
1ae633
 libselinux/src/Makefile | 5 +----
1ae633
 1 file changed, 1 insertion(+), 4 deletions(-)
1ae633
1ae633
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
1ae633
index 826c830c..f64f23a8 100644
1ae633
--- a/libselinux/src/Makefile
1ae633
+++ b/libselinux/src/Makefile
1ae633
@@ -104,9 +104,6 @@ FTS_LDLIBS ?=
1ae633
 
1ae633
 override CFLAGS += -I../include -D_GNU_SOURCE $(DISABLE_FLAGS) $(PCRE_CFLAGS)
1ae633
 
1ae633
-SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \
1ae633
-		-Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations
1ae633
-
1ae633
 RANLIB ?= ranlib
1ae633
 
1ae633
 ARCH := $(patsubst i%86,i386,$(shell uname -m))
1ae633
@@ -130,7 +127,7 @@ SWIGRUBY = swig -Wall -ruby -o $(SWIGRUBYCOUT) -outdir ./ $(DISABLE_FLAGS)
1ae633
 all: $(LIBA) $(LIBSO) $(LIBPC)
1ae633
 
1ae633
 pywrap: all selinuxswig_python_exception.i
1ae633
-	CFLAGS="$(SWIG_CFLAGS)" $(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR)
1ae633
+	$(PYTHON) setup.py build_ext -I $(DESTDIR)$(INCLUDEDIR) -L $(DESTDIR)$(LIBDIR)
1ae633
 
1ae633
 rubywrap: all $(SWIGRUBYSO)
1ae633
 
1ae633
-- 
1ae633
2.22.0
1ae633