File: hardening.patch

package info (click to toggle)
phast 1.7%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 13,124 kB
  • sloc: ansic: 54,210; makefile: 364; sh: 348; perl: 321
file content (30 lines) | stat: -rw-r--r-- 1,226 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
Author: Andreas Tille <tille@debian.org>
Reviewed-By: Étienne Mollier <emollier@debian.org>
Last-Update: 2025-01-05
Forwarded: not-needed
Description: Propagate hardening options
 Later edited to add support for CPPFLAGS.  This change modifies the
 build infrastructure for needs that are somewhat Debian specific, hence
 forwarding not needed.

--- a/src/make-include.mk
+++ b/src/make-include.mk
@@ -48,7 +48,7 @@ ifneq ($(TARGETOS), Windows)
 # CFLAGS = -g -fno-inline -Wall -DPHAST_DEBUG -DNDEBUG -mtune=native -fno-strict-aliasing -fPIC -O2 -pedantic -Wconversion -Wno-sign-conversion
 #  CFLAGS = -g -fno-inline -Wall -DPHAST_DEBUG
  # for best performance
- CFLAGS = -O3 -Wall
+ CFLAGS += $(CPPFLAGS) -O3 -Wall
  # some other options
  #CFLAGS = -mcpu=opteron -O3
  #CFLAGS = -mcpu=pentiumpro -O3 
@@ -137,8 +137,8 @@ LIBS = -lphast -framework vecLib -lc -lm
 else
 ifdef CLAPACKPATH
 ifneq ($(TARGETOS), Windows)
-  LIBS = -lphast -llapack -ltmglib -lblas -lc -lm -lpcre
+  LIBS = -lphast -llapack -ltmglib -lblas -lc -lm -lpcre $(LDFLAGS)
 else
   CFLAGS += -I${CLAPACKPATH}/INCLUDE -I${F2CPATH} -DPCRE_STATIC
   LIBS = -lphast -lm  ${CLAPACKPATH}/liblapack.a ${CLAPACKPATH}/libf2c.a ${CLAPACKPATH}/libblas.a
 endif