comparison mupdf-source/Makerules @ 12:fdb709369d57

Do not use -z,relro,-z,now on Systems where it is not supported. This is especially Darwin.
author Franz Glasner <fzglas.hg@dom66.de>
date Wed, 17 Sep 2025 15:31:57 +0200
parents 5ab937c03c27
children 59f1bd90b2a0
comparison
equal deleted inserted replaced
11:f704f0a78213 12:fdb709369d57
150 ifeq ($(build),debug) 150 ifeq ($(build),debug)
151 CFLAGS += -pipe -g 151 CFLAGS += -pipe -g
152 LDFLAGS += -g 152 LDFLAGS += -g
153 else ifeq ($(build),release) 153 else ifeq ($(build),release)
154 CFLAGS += -pipe -O2 -DNDEBUG 154 CFLAGS += -pipe -O2 -DNDEBUG
155 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s,-z,relro,-z,now 155 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
156 ifneq ($(OS),Darwin)
157 LDFLAGS += -Wl,-z,relro,-z,now
158 endif
156 else ifeq ($(build),small) 159 else ifeq ($(build),small)
157 CFLAGS += -pipe -Os -DNDEBUG 160 CFLAGS += -pipe -Os -DNDEBUG
158 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s,-z,relro,-z,now 161 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
162 ifneq ($(OS),Darwin)
163 LDFLAGS += -Wl,-z,relro,-z,now
164 endif
159 else ifeq ($(build),valgrind) 165 else ifeq ($(build),valgrind)
160 CFLAGS += -pipe -O2 -DNDEBUG -DPACIFY_VALGRIND 166 CFLAGS += -pipe -O2 -DNDEBUG -DPACIFY_VALGRIND
161 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s,-z,relro,-z,now 167 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
168 ifneq ($(OS),Darwin)
169 LDFLAGS += -Wl,-z,relro,-z,now
170 endif
162 else ifeq ($(build),sanitize) 171 else ifeq ($(build),sanitize)
163 CFLAGS += -pipe -g $(SANITIZE_FLAGS) 172 CFLAGS += -pipe -g $(SANITIZE_FLAGS)
164 LDFLAGS += -g $(SANITIZE_FLAGS) 173 LDFLAGS += -g $(SANITIZE_FLAGS)
165 else ifeq ($(build),sanitize-release) 174 else ifeq ($(build),sanitize-release)
166 CFLAGS += -pipe -O2 -DNDEBUG $(SANITIZE_FLAGS) 175 CFLAGS += -pipe -O2 -DNDEBUG $(SANITIZE_FLAGS)
171 else ifeq ($(build),coverage) 180 else ifeq ($(build),coverage)
172 CFLAGS += -pipe -g -pg -fprofile-arcs -ftest-coverage 181 CFLAGS += -pipe -g -pg -fprofile-arcs -ftest-coverage
173 LIBS += -lgcov 182 LIBS += -lgcov
174 else ifeq ($(build),native) 183 else ifeq ($(build),native)
175 CFLAGS += -pipe -O2 -DNDEBUG -march=native 184 CFLAGS += -pipe -O2 -DNDEBUG -march=native
176 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s,-z,relro,-z,now 185 LDFLAGS += $(LDREMOVEUNREACH) -Wl,-s
186 ifneq ($(OS),Darwin)
187 LDFLAGS += -Wl,-z,relro,-z,now
188 endif
177 else ifeq ($(build),memento) 189 else ifeq ($(build),memento)
178 CFLAGS += -pipe -g -DMEMENTO -DMEMENTO_MUPDF_HACKS 190 CFLAGS += -pipe -g -DMEMENTO -DMEMENTO_MUPDF_HACKS
179 LDFLAGS += -g -rdynamic 191 LDFLAGS += -g -rdynamic
180 ifneq ($(HAVE_LIBDL),no) 192 ifneq ($(HAVE_LIBDL),no)
181 CFLAGS += -DHAVE_LIBDL 193 CFLAGS += -DHAVE_LIBDL