File: honor-cppflags-ldflags.patch

package info (click to toggle)
slgdbm 1.7.1-17
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 240 kB
  • sloc: ansic: 2,355; makefile: 114
file content (19 lines) | stat: -rw-r--r-- 744 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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@debian.org>
Forwarded: https://lists.jedsoft.org/lists/slang-devel/2021/0000012.html
Last-Update: 2021-11-19

--- slgdbm-1.7.1.orig/Makefile
+++ slgdbm-1.7.1/Makefile
@@ -41,7 +41,7 @@ INCS = $(SLANG_INC)
 all: gdbm-module.so
 
 gdbm-module.so: gdbm-module.c
-	$(CC_SHARED) $(INCS) gdbm-module.c -o gdbm-module.so $(LIBS)
+	$(CC_SHARED) $(CPPFLAGS) $(INCS) $(LDFLAGS) gdbm-module.c -o gdbm-module.so $(LIBS)
 
 gdbm.o: gdbm-module.c
 	gcc $(CFLAGS) $(INCS) -O2 -c -g gdbm-module.c -o gdbm.o