selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 01/13] checkpolicy: pass CFLAGS at link stage
@ 2021-07-06 17:54 Christian Göttsche
  2021-07-06 17:54 ` [PATCH 02/13] checkpolicy: drop -pipe compile option Christian Göttsche
                   ` (11 more replies)
  0 siblings, 12 replies; 15+ messages in thread
From: Christian Göttsche @ 2021-07-06 17:54 UTC (permalink / raw)
  To: selinux

Pass CFLAGS when invoking CC at link time, it might contain optimization
or sanitizer flags required for linking.

Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
---
 checkpolicy/Makefile      | 4 ++--
 checkpolicy/test/Makefile | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/checkpolicy/Makefile b/checkpolicy/Makefile
index 0d282ef9..be63c018 100644
--- a/checkpolicy/Makefile
+++ b/checkpolicy/Makefile
@@ -30,10 +30,10 @@ all:  $(TARGETS)
 	$(MAKE) -C test
 
 checkpolicy: $(CHECKPOLOBJS) $(LIBSEPOLA)
-	$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS_LIBSEPOLA)
+	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS_LIBSEPOLA)
 
 checkmodule: $(CHECKMODOBJS) $(LIBSEPOLA)
-	$(CC) -o $@ $^ $(LDFLAGS) $(LDLIBS_LIBSEPOLA)
+	$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) $(LDLIBS_LIBSEPOLA)
 
 %.o: %.c 
 	$(CC) $(CFLAGS) -o $@ -c $<
diff --git a/checkpolicy/test/Makefile b/checkpolicy/test/Makefile
index 89e7557c..e2a332b5 100644
--- a/checkpolicy/test/Makefile
+++ b/checkpolicy/test/Makefile
@@ -13,10 +13,10 @@ endif
 all: dispol dismod
 
 dispol: dispol.o $(LIBSEPOLA)
-	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS_LIBSEPOLA)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS_LIBSEPOLA)
 
 dismod: dismod.o $(LIBSEPOLA)
-	$(CC) $(LDFLAGS) -o $@ $^ $(LDLIBS_LIBSEPOLA)
+	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ $(LDLIBS_LIBSEPOLA)
 
 clean:
 	-rm -f dispol dismod *.o 
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2021-07-13 19:59 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-06 17:54 [PATCH 01/13] checkpolicy: pass CFLAGS at link stage Christian Göttsche
2021-07-06 17:54 ` [PATCH 02/13] checkpolicy: drop -pipe compile option Christian Göttsche
2021-07-06 17:54 ` [PATCH 03/13] checkpolicy: simplify assignment Christian Göttsche
2021-07-06 17:54 ` [PATCH 04/13] checkpolicy: drop dead condition Christian Göttsche
2021-07-06 17:54 ` [PATCH 05/13] checkpolicy: use correct format specifier for unsigned Christian Göttsche
2021-07-06 17:54 ` [PATCH 06/13] checkpolicy: follow declaration-after-statement Christian Göttsche
2021-07-12  7:13   ` Nicolas Iooss
2021-07-13 19:59     ` Nicolas Iooss
2021-07-06 17:54 ` [PATCH 07/13] checkpolicy: remove dead assignments Christian Göttsche
2021-07-06 17:54 ` [PATCH 08/13] checkpolicy: check before potential NULL dereference Christian Göttsche
2021-07-06 17:54 ` [PATCH 09/13] checkpolicy: avoid potential use of uninitialized variable Christian Göttsche
2021-07-06 17:54 ` [PATCH 10/13] checkpolicy: drop redundant cast to the same type Christian Göttsche
2021-07-06 17:54 ` [PATCH 11/13] checkpolicy: parse_util drop unused declaration Christian Göttsche
2021-07-06 17:54 ` [PATCH 12/13] checkpolicy/test: mark file local functions static Christian Göttsche
2021-07-06 17:54 ` [PATCH 13/13] checkpolicy: mark read-only parameters in policy define const Christian Göttsche

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).