File: enable-clang-hardening.patch

package info (click to toggle)
cmucl 21d-2.1
  • links: PTS
  • area: main
  • in suites: bookworm
  • size: 45,364 kB
  • sloc: lisp: 378,758; ansic: 30,678; asm: 2,977; sh: 1,417; makefile: 352; csh: 31
file content (24 lines) | stat: -rw-r--r-- 825 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
20
21
22
23
24
Description: Enable the same hardening, but this time for clang
Author: Peter Van Eynde <pvaneynd@debian.org>
Forwarded: not needed

--- cmucl.orig/src/lisp/Config.x86_linux_clang
+++ cmucl/src/lisp/Config.x86_linux_clang
@@ -3,7 +3,10 @@
 
 CC = clang
 CPPFLAGS += -m32 -D__NO_CTYPE -D_GNU_SOURCE
+CPPFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
 CFLAGS += -march=pentium4 -mfpmath=sse -mtune=generic
+CFLAGS += $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS += $(shell dpkg-buildflags --get CPPFLAGS)
 
 UNDEFSYMPATTERN = -Xlinker -u -Xlinker &
 ASSEM_SRC +=  linux-stubs.S
@@ -11,5 +14,6 @@
 OS_LIBS = -ldl
 OS_LINK_FLAGS = -m32 -rdynamic -Xlinker --export-dynamic -Xlinker -Map -Xlinker foo
 OS_LINK_FLAGS += -Wl,-z,noexecstack
+OS_LINK_FLAGS += $(shell dpkg-buildflags --get LDFLAGS)
 
 EXEC_FINAL_OBJ = exec-final.o