|
From: <mil...@us...> - 2008-02-27 20:28:24
|
Revision: 2818
http://selinux.svn.sourceforge.net/selinux/?rev=2818&view=rev
Author: millertc
Date: 2008-02-27 12:28:20 -0800 (Wed, 27 Feb 2008)
Log Message:
-----------
Author: Todd C. Miller <tm...@tr...>
Date: Wednesday, February 27, 2008 1:44 PM
Subject: PATCH: avoid -Werror for parser-generated sources
We've been bitten repeatedly by changes in lex and yacc resulting in
new compiler warnings. Now that we build with -Werror this can result
in broken builds. Since we have little control over what lex and yacc
generate, just filter out -Werror when compiling their .c files.
Signed-off-by: Todd C. Miller <tm...@tr...>
Acked-by: Stephen Smalley <sd...@ty...>
Modified Paths:
--------------
trunk/checkpolicy/Makefile
trunk/libsemanage/src/Makefile
Modified: trunk/checkpolicy/Makefile
===================================================================
--- trunk/checkpolicy/Makefile 2008-02-26 12:18:28 UTC (rev 2817)
+++ trunk/checkpolicy/Makefile 2008-02-27 20:28:20 UTC (rev 2818)
@@ -33,10 +33,10 @@
$(CC) $(CFLAGS) -o $@ -c $<
y.tab.o: y.tab.c
- $(CC) $(CFLAGS) -o $@ -c $<
+ $(CC) $(filter-out -Werror, $(CFLAGS)) -o $@ -c $<
lex.yy.o: lex.yy.c
- $(CC) $(CFLAGS) -o $@ -c $<
+ $(CC) $(filter-out -Werror, $(CFLAGS)) -o $@ -c $<
y.tab.c: policy_parse.y
$(YACC) -d policy_parse.y
Modified: trunk/libsemanage/src/Makefile
===================================================================
--- trunk/libsemanage/src/Makefile 2008-02-26 12:18:28 UTC (rev 2817)
+++ trunk/libsemanage/src/Makefile 2008-02-27 20:28:20 UTC (rev 2818)
@@ -71,6 +71,18 @@
%.lo: %.c
$(CC) $(CFLAGS) -fPIC -DSHARED -c -o $@ $<
+conf-parse.o: conf-parse.c
+ $(CC) $(filter-out -Werror, $(CFLAGS)) -c -o $@ $<
+
+conf-parse.lo: conf-parse.c
+ $(CC) $(filter-out -Werror, $(CFLAGS)) -fPIC -DSHARED -c -o $@ $<
+
+conf-scan.o: conf-scan.c
+ $(CC) $(filter-out -Werror, $(CFLAGS)) -c -o $@ $<
+
+conf-scan.lo: conf-scan.c
+ $(CC) $(filter-out -Werror, $(CFLAGS)) -fPIC -DSHARED -c -o $@ $<
+
$(SWIGCOUT): $(SWIGIF)
$(SWIG) $^
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|