slang-devel mailing list

[2021 Date Index] [2021 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

[slang-devel] Honoring compilation env vars in slxfig


Hello,

When building slxfig for Debian, we should ensure that the environment variable CPPFLAGS, and LDFLAGS are honored. This is required in Debian, because the hardening flags [*] -D_FORTIFY_SOURCE=2 and -Wl,-z,relro must be used in the compilation and linking of C files.

Best,

Rafael Laboissière

[*] https://wiki.debian.org/Hardening
Description: Honor the environment variables CPPFLAGS and LDFLAGS
 This is required in Debian, such that hardening flags like
 -D_FORTIFY_SOURCE=2 and -Wl,-z,relro are used in the compilation
 and linking of C files.
Author: Rafael Laboissière <rafael@xxxxxxxxxx>
Forwarded: no
Last-Update: 2021-11-17

--- slxfig-0.2.0~.131.orig/src/Makefile.in
+++ slxfig-0.2.0~.131/src/Makefile.in
@@ -66,7 +66,7 @@ all: $(MODULES) xfig.sl
 # Put Rules to create the modules here
 #---------------------------------------------------------------------------
 gcontour-module.so: gcontour-module.c
-	$(CC_SHARED) $(INCS) gcontour-module.c -o gcontour-module.so $(LIBS)
+	$(CC_SHARED) $(CPPFLAGS) $(INCS) $(LDFLAGS) gcontour-module.c -o gcontour-module.so $(LIBS)
 xfig.sl: ../changes.txt
 	if [ -x $(UPDATE_VERSION_SCRIPT) ]; then \
 	  $(UPDATE_VERSION_SCRIPT) ../changes.txt xfig.sl; \

[2021 date index] [2021 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]