-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 This patch looks good to me. acked. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk/I+ZYACgkQrlYvE4MpobOpyACgn4m1Nw78MOy1G25b+qNILgbn cWoAnj+e0zOGiB0pTJ7vmJ+G0Jpd/kPi =SztA -----END PGP SIGNATURE-----
>From a99112f86e276643b29bc3dd6e9323f5f4ff3c6a Mon Sep 17 00:00:00 2001 From: Eric Paris <eparis@xxxxxxxxxx> Date: Thu, 19 Apr 2012 15:09:57 -0400 Subject: [PATCH 47/90] libselinux: libsemanage: remove build warning when build swig c files swig creates C files with warnings. Turn off the warnings so the build is clean. We can't help the code it produces anyway... Signed-off-by: Eric Paris <eparis@xxxxxxxxxx> --- libselinux/src/Makefile | 8 ++++++-- libsemanage/Makefile | 6 ++++++ libsemanage/src/Makefile | 7 +++++-- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile index d84033e..92549f8 100644 --- a/libselinux/src/Makefile +++ b/libselinux/src/Makefile @@ -75,6 +75,10 @@ CFLAGS ?= -Wall -W -Wundef -Wformat-y2k -Wformat-security -Winit-self -Wmissing- -Werror -Wno-aggregate-return -Wno-redundant-decls override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 $(EMFLAGS) + +SWIG_CFLAGS += -Wno-error -Wno-unused-variable -Wno-unused-but-set-variable -Wno-unused-parameter \ + -Wno-shadow -Wno-uninitialized -Wno-missing-prototypes -Wno-missing-declarations + RANLIB=ranlib ARCH := $(patsubst i%86,i386,$(shell uname -m)) @@ -93,10 +97,10 @@ pywrap: all $(SWIGSO) $(AUDIT2WHYSO) rubywrap: all $(SWIGRUBYSO) $(SWIGLOBJ): $(SWIGCOUT) - $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $< + $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(PYINC) -fPIC -DSHARED -c -o $@ $< $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) - $(CC) $(filter-out -Werror, $(CFLAGS)) $(RUBYINC) -fPIC -DSHARED -c -o $@ $< + $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(RUBYINC) -fPIC -DSHARED -c -o $@ $< $(SWIGSO): $(SWIGLOBJ) $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lselinux -L$(LIBDIR) $(PYTHONLIBDIR) diff --git a/libsemanage/Makefile b/libsemanage/Makefile index 073dc09..6c574b0 100644 --- a/libsemanage/Makefile +++ b/libsemanage/Makefile @@ -7,6 +7,9 @@ swigify: pywrap: $(MAKE) -C src pywrap +rubywrap: + $(MAKE) -C src rubywrap + install: $(MAKE) -C include install $(MAKE) -C src install @@ -15,6 +18,9 @@ install: install-pywrap: $(MAKE) -C src install-pywrap +install-rubywrap: + $(MAKE) -C src install-rubywrap + relabel: $(MAKE) -C src relabel diff --git a/libsemanage/src/Makefile b/libsemanage/src/Makefile index dd2cc69..aaa98d1 100644 --- a/libsemanage/src/Makefile +++ b/libsemanage/src/Makefile @@ -57,6 +57,9 @@ OBJS= $(patsubst %.c,%.o,$(SRCS)) conf-scan.o conf-parse.o LOBJS= $(patsubst %.c,%.lo,$(SRCS)) conf-scan.lo conf-parse.lo CFLAGS ?= -Werror -Wall -W -Wundef -Wshadow -Wmissing-noreturn -Wmissing-format-attribute +SWIG_CFLAGS += -Wno-error -Wno-unused-but-set-variable -Wno-unused-variable -Wno-shadow \ + -Wno-unused-parameter + override CFLAGS += -I../include -I$(INCLUDEDIR) -D_GNU_SOURCE RANLIB=ranlib @@ -73,10 +76,10 @@ pywrap: all $(SWIGSO) rubywrap: all $(SWIGRUBYSO) $(SWIGLOBJ): $(SWIGCOUT) - $(CC) $(filter-out -Werror, $(CFLAGS)) $(PYINC) -fPIC -DSHARED -c -o $@ $< + $(CC) $(CFLAGS) $(SWIG_CFLAGS) $(PYINC) -fPIC -DSHARED -c -o $@ $< $(SWIGRUBYLOBJ): $(SWIGRUBYCOUT) - $(CC) $(filter-out -Werror, $(CFLAGS)) -I$(RUBYINC) -fPIC -DSHARED -c -o $@ $< + $(CC) $(CFLAGS) $(SWIG_CFLAGS) -I$(RUBYINC) -fPIC -DSHARED -c -o $@ $< $(SWIGSO): $(SWIGLOBJ) $(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $< -L. -lsemanage -L$(LIBDIR) -Wl,-soname,$@ -- 1.7.10.2