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 slcurl


Hello,

When building slcurl 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-15

--- slcurl-0.2.2~pre.10.orig/src/Makefile.in
+++ slcurl-0.2.2~pre.10/src/Makefile.in
@@ -69,7 +69,7 @@ all: $(MODULES)
 # Put Rules to create the modules here
 #---------------------------------------------------------------------------
 curl-module.so: curl-module.c version.h
-	$(CC_SHARED) $(INCS) curl-module.c -o curl-module.so $(LIBS)
+	$(CC_SHARED) $(CPPFLAGS) $(INCS) $(LDFLAGS) curl-module.c -o curl-module.so $(LIBS)
 version.h: ../changes.txt
 	if [ -x $(UPDATE_VERSION_SCRIPT) ]; then \
 	  $(UPDATE_VERSION_SCRIPT) ../changes.txt ./version.h; \

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