File: hardening-flags

package info (click to toggle)
why3 1.5.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 45,232 kB
  • sloc: xml: 197,259; ml: 95,195; ansic: 3,910; sh: 2,353; makefile: 2,169; python: 636; javascript: 290; lisp: 201
file content (41 lines) | stat: -rw-r--r-- 1,134 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
From: Debian OCaml Maintainers <debian-ocaml-maint@lists.debian.org>
Date: Mon, 10 Feb 2020 13:53:39 +0100
Subject: hardening-flags

===================================================================
---
 Makefile.in | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

Index: why3/Makefile.in
===================================================================
--- why3.orig/Makefile.in	2022-05-02 20:40:02.322768958 +0200
+++ why3/Makefile.in	2022-05-02 20:40:02.290768720 +0200
@@ -19,6 +19,10 @@
   HIDE = @
 endif
 
+CFLAGS  := $(shell dpkg-buildflags --get CFLAGS)
+CFLAGS  += $(shell dpkg-buildflags --get CPPFLAGS)
+LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS)
+
 # install the binaries
 DESTDIR =
 
@@ -728,13 +732,13 @@
 all: $(TOOLS)
 
 lib/why3server$(EXE): $(SERVER_O)
-	$(CC) -Wall -o $@ $^
+	$(CC) -Wall $(LDFLAGS) -o  $@ $^
 
 lib/why3cpulimit$(EXE): $(CPULIM_O)
-	$(CC) -Wall -o $@ $^
+	$(CC) -Wall $(LDFLAGS) -o $@ $^
 
 %.o: %.c
-	$(CC) -Wall -O -g -o $@ -c $<
+	$(CC) -Wall -O -g $(CFLAGS) -o $@ -c $<
 
 uninstall-bin::
 	rm -f $(LIBDIR)/why3/why3server$(EXE) $(LIBDIR)/why3/why3cpulimit$(EXE)