File: harden.patch

package info (click to toggle)
cdftools 4.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, trixie
  • size: 3,948 kB
  • sloc: f90: 43,175; makefile: 457; sh: 96; ada: 22
file content (19 lines) | stat: -rw-r--r-- 600 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
Author: Alastair McKinstry <mckinstry@debian.org>
Description: Add LDFLAGS in order to harden executables
Last-Updated: 2013-05-24
Forwarded: not-needed

--- a/Macrolib/macro.gfortran
+++ b/Macrolib/macro.gfortran
@@ -14,10 +14,9 @@
 
 #F90=gfortran -v
 F90=gfortran 
-MPF90=
 #OMP=-fopenmp
 OMP=
-FFLAGS= -O  $(NCDF) $(NC4) $(CMIP6)  -fno-second-underscore -ffree-line-length-256 $(OMP)
+FFLAGS= -O3 -Wl,-z,now $(LDFLAGS)  $(NCDF)  -fno-second-underscore -ffree-line-length-256 -D_FORTIFY_SOURCE=2  -fstack-protector --param=ssp-buffer-size=4 -Wl,--as-needed
 LMPI=-lmpich
 
 INSTALL=$(WORKDIR)/bin