/mandos/trunk

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/trunk

« back to all changes in this revision

Viewing changes to Makefile

  • Committer: Teddy Hogeborn
  • Date: 2023-02-11 06:46:26 UTC
  • Revision ID: teddy@recompile.se-20230211064626-2aqhtdd46jbif6h6
Really enable FORTIFY_SOURCE=3

Use -DFORTIFY_SOURCE=3 by appending it to CPPFLAGS directly instead of
adding it indirectly to CFLAGS.

* Makefile (FORTIFY): Remove "-D_FORTIFY_SOURCE=3".
  (Fortify section/CPPFLAGS): New; append "-D_FORTIFY_SOURCE=3".
  (FEATURES): Remove.  Contents moved to CPPFLAGS.
  (CPPFLAGS): New; append "-D_FILE_OFFSET_BITS=64".
  (CFLAGS): Do not use "$(FEATURES)".

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
# For info about _FORTIFY_SOURCE, see feature_test_macros(7)
31
31
# and <https://gcc.gnu.org/ml/gcc-patches/2004-09/msg02055.html>.
32
 
FORTIFY:=-D_FORTIFY_SOURCE=3 -fstack-protector-all -fPIC
 
32
FORTIFY:=-fstack-protector-all -fPIC
 
33
CPPFLAGS+=-D_FORTIFY_SOURCE=3
33
34
LINK_FORTIFY_LD:=-z relro -z now
34
35
LINK_FORTIFY:=
35
36
 
41
42
#COVERAGE=--coverage
42
43
OPTIMIZE:=-Os -fno-strict-aliasing
43
44
LANGUAGE:=-std=gnu11
44
 
FEATURES:=-D_FILE_OFFSET_BITS=64
 
45
CPPFLAGS+=-D_FILE_OFFSET_BITS=64
45
46
htmldir:=man
46
47
version:=1.8.16
47
48
SED:=sed
108
109
 
109
110
# Do not change these two
110
111
CFLAGS+=$(WARN) $(DEBUG) $(FORTIFY) $(COVERAGE) $(OPTIMIZE) \
111
 
        $(LANGUAGE) $(FEATURES) -DVERSION='"$(version)"'
 
112
        $(LANGUAGE) -DVERSION='"$(version)"'
112
113
LDFLAGS+=-Xlinker --as-needed $(COVERAGE) $(LINK_FORTIFY) $(strip \
113
114
        ) $(foreach flag,$(LINK_FORTIFY_LD),-Xlinker $(flag))
114
115