debian-cflags.patch 825 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
From: Tzafrir Cohen <tzafrir@debian.org>
Subject: Get hardening flags to some dahdi tools

--- a/Makefile
+++ b/Makefile
@@ -153,6 +153,7 @@ version.c: FORCE
 tests: $(TEST_BINS)
 
 $(UTILS): %: %.o
+	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
 
 $(UTILS): version.o
 
@@ -163,7 +164,7 @@ $(UTILS): version.o
 	$(CC) $(CFLAGS) $(MAKE_DEPS) -c -o $@ $<
 
 %: %.o
-	$(CC) $(LDFLAGS) $^ $(LIBS) -o $@
+	$(CC) $(CFLAGS) $(LDFLAGS) $^ $(LIBS) -o $@
 
 prereq: config.status
 
@@ -177,7 +178,7 @@ $(LTZ_A): $(LTZ_A_OBJS)
 	ranlib $@
 
 $(LTZ_SO): $(LTZ_SO_OBJS)
-	$(CC) $(CFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ -lm
+	$(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-soname,$(LTZ_SO).$(LTZ_SO_MAJOR_VER).$(LTZ_SO_MINOR_VER) -o $@ $^ -lm
 
 dahdi_cfg: $(LTZ_A)
 dahdi_cfg: LIBS+=-lm -lpthread