added CFLAGS, CPPFLAGS and LDFLAGS for PSPP.C and q2c.c compilation
authorFriedrich Beckmann <friedrich.beckmann@gmx.de>
Mon, 10 Oct 2016 17:39:06 +0000 (19:39 +0200)
committerFriedrich Beckmann <friedrich.beckmann@gmx.de>
Mon, 10 Oct 2016 17:39:06 +0000 (19:39 +0200)
The hardening check during the debian build process showed that the
hardening compile flags are not issued to the compilation process of
PSPP.c (the perl module) and q2c.c (the lexer). Although q2c.c is only
relevant during the build process hardening this will not hurt.

perl-module/automake.mk
src/language/lexer/automake.mk

index 276af3930accccc6200ec53da4446ee1c7c4864d..92e9dcaf73c7570364b874473f9a326343122461 100644 (file)
@@ -26,7 +26,9 @@ perl-module/pspp-module-config: Makefile
         echo ');') > $(top_builddir)/perl-module/pspp-module-config
 
 perl-module/Makefile: perl-module/Makefile.PL perl-module/pspp-module-config $(module_sources)
-       $(AM_V_GEN)cd perl-module && $(PERL) Makefile.PL PREFIX=$(prefix)
+       $(AM_V_GEN)cd perl-module && $(PERL) Makefile.PL PREFIX=$(prefix) \
+                                                         OPTIMIZE="$(CFLAGS) $(CPPFLAGS)" \
+                                                         LD="`$(PERL) -V::ld:` $(LDFLAGS)"
 
 perl-module/PSPP-Perl-$(VERSION_FOR_PERL).tar.gz: $(module_sources) perl-module/Makefile
        $(AM_V_at)rm -f $@
index 7313e08597f8f32259f0d33e3619d22e371aead6..61e1bb239fd7b192c95930422530c6853d1b2825 100644 (file)
@@ -28,7 +28,7 @@ EXTRA_DIST += src/language/lexer/q2c.c
 
 src/language/lexer/q2c$(EXEEXT_FOR_BUILD): $(top_srcdir)/src/language/lexer/q2c.c 
        @$(MKDIR_P) `dirname $@`
-       $(AM_V_GEN)$(CC_FOR_BUILD) $(top_srcdir)/src/language/lexer/q2c.c -o $(top_builddir)/src/language/lexer/q2c$(EXEEXT_FOR_BUILD)
+       $(AM_V_GEN)$(CC_FOR_BUILD) $(top_srcdir)/src/language/lexer/q2c.c $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $(top_builddir)/src/language/lexer/q2c$(EXEEXT_FOR_BUILD)
 
 
 CLEANFILES += src/language/lexer/q2c$(EXEEXT_FOR_BUILD)