comparison mupdf-source/Makerules @ 31:baeb8bdeff3a

Fortify sources using _FORTIFY_SOURCE=3 and also apply -fno-delete-null-pointer-checks. See: https://github.com/ossf/wg-best-practices-os-developers/issues/659.
author Franz Glasner <fzglas.hg@dom66.de>
date Sun, 21 Sep 2025 13:11:30 +0200
parents 59f1bd90b2a0
children 72c1b70d4f5c
comparison
equal deleted inserted replaced
30:fc4555a3097b 31:baeb8bdeff3a
101 # System specific features 101 # System specific features
102 102
103 ifeq ($(findstring -fembed-bitcode,$(XCFLAGS)),) 103 ifeq ($(findstring -fembed-bitcode,$(XCFLAGS)),)
104 # clang does not support these in combination with -fembed-bitcode 104 # clang does not support these in combination with -fembed-bitcode
105 CFLAGS += -ffunction-sections -fdata-sections 105 CFLAGS += -ffunction-sections -fdata-sections
106 endif
107
108 ifneq ($(EXTRA_CHECKS),0)
109 CFLAGS += -fno-delete-null-pointer-checks
106 endif 110 endif
107 111
108 ifeq ($(OS),Darwin) 112 ifeq ($(OS),Darwin)
109 LDREMOVEUNREACH := -Wl,-dead_strip 113 LDREMOVEUNREACH := -Wl,-dead_strip
110 SO := dylib 114 SO := dylib