- Subject: [slang-devel] Honoring compilation env vars in slcfitsio
- From: Rafael Laboissière <rafael@xxxxxxxxxx>
- Date: Mon, 15 Nov 2021 15:38:44 +0100
Hello,
When building slcfitsio for Debian, we should ensure that the environment
variable CFLAGS, CPPFLAGS, and LDFLAGS will be honored. This is required
in Debian, because the hardening flags [*] -D_FORTIFY_SOURCE=2,
-fstack-protector-strong -Wformat + -Werror=format-security, and
-Wl,-z,relro must be used in the compilation and linking of C files.
The file attached to this message is being currently used in Debian.
Please, consider applying it (or a variation of it) for the next release.
Best,
Rafael Laboissière
[*] https://wiki.debian.org/Hardening
Description: Honor the environment variable CFLAGS, CPPFLAGS, and LDFLAGS
This is required in Debian, such that hardening flags like
-D_FORTIFY_SOURCE=2, -fstack-protector-strong -Wformat
-Werror=format-security, 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
--- slcfitsio-0.4.7~pre.16.orig/src/Makefile.in
+++ slcfitsio-0.4.7~pre.16/src/Makefile.in
@@ -66,9 +66,9 @@ all: $(MODULES)
# Put Rules to create the modules here
#---------------------------------------------------------------------------
cfitsio-module.so: cfitsio-module.c version.h config.h cfitsio.h cfitsio-version.h
- $(CC_SHARED) $(INCS) cfitsio-module.c -o cfitsio-module.so $(LIBS)
+ $(CC_SHARED) $(CPPFLAGS) $(INCS) $(LDFLAGS) cfitsio-module.c -o cfitsio-module.so $(LIBS)
cfitsio-version.h: cfitsio-version.c
- $(CC) $(INCS) cfitsio-version.c -o cfitsio-version $(LIBS)
+ $(CC) $(CPPFLAGS) $(CFLAGS) $(INCS) $(LDFLAGS) cfitsio-version.c -o cfitsio-version $(LIBS)
./cfitsio-version > cfitsio-version.h
version.h: ../changes.txt
if [ -x $(UPDATE_VERSION_SCRIPT) ]; then \
[2021 date index]
[2021 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]