- Subject: [slang-devel] Honoring compilation env vars in slexpat
- From: Rafael Laboissière <rafael@xxxxxxxxxx>
- Date: Thu, 18 Nov 2021 20:46:34 +0100
Hello,
When building slexpat 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: https://lists.jedsoft.org/lists/slang-devel/2021/0000011.html
Last-Update: 2021-11-18
--- slexpat-0.5.0.orig/Makefile
+++ slexpat-0.5.0/Makefile
@@ -41,7 +41,7 @@ INCS = $(SLANG_INC)
all: expat-module.so
expat-module.so: expat-module.c
- $(CC_SHARED) $(INCS) expat-module.c -o expat-module.so $(LIBS)
+ $(CC_SHARED) $(CPPFLAGS) $(INCS) $(LDFLAGS) expat-module.c -o expat-module.so $(LIBS)
expat.hlp: expatfuns.tm
tmexpand -Mslhlp expatfuns.tm expat.hlp
[2021 date index]
[2021 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]