Description: Enable Debian hardening by avoiding to overwrite CFLAGS
Author: Peter Van Eynde <pvaneynd@debian.org>
Forwarded: not-needed

--- cmucl.orig/src/motif/server/GNUmakefile
+++ cmucl/src/motif/server/GNUmakefile
@@ -1,6 +1,6 @@
-LIBS = -lXm -lXt -lX11
-CFLAGS = -O
-LDFLAGS =
+LIBS += -lXm -lXt -lX11
+#CFLAGS = -O
+#LDFLAGS =
 
 TARGET = motifd
 OBJS = main.o server.o translations.o packet.o message.o datatrans.o \
--- cmucl.orig/src/lisp/Config.x86_linux
+++ cmucl/src/lisp/Config.x86_linux
@@ -2,7 +2,10 @@
 include Config.x86_common
 
 CPPFLAGS += -m32 -D__NO_CTYPE -D_GNU_SOURCE
+CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
 CFLAGS += -rdynamic  -march=pentium4 -mfpmath=sse -mtune=generic
+CFLAGS += $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
 
 UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
 ASSEM_SRC +=  linux-stubs.S
@@ -10,5 +13,6 @@
 OS_LIBS = -ldl
 OS_LINK_FLAGS = -m32 -rdynamic -Xlinker --export-dynamic -Xlinker -Map -Xlinker foo
 OS_LINK_FLAGS += -Wl,-z,noexecstack
+OS_LINK_FLAGS += $(shell dpkg-buildflags --get LDFLAGS)
 
 EXEC_FINAL_OBJ = exec-final.o
