File: 03_allow_cflags_override.diff

package info (click to toggle)
ne 3.3.4-3
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 2,556 kB
  • sloc: ansic: 25,614; perl: 572; makefile: 265; ruby: 232; sh: 38
file content (27 lines) | stat: -rw-r--r-- 920 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
Description: Use cflags and ldflags from dpkg-buildflags and avoid
 the usage of -O3 optimization level.
Forwarded: not-needed
Author: Julián Moreno Patiño <darkjunix@gmail.com>
Last-Update: 2024-09-11
--- a/src/makefile
+++ b/src/makefile
@@ -102,16 +102,16 @@
 GCC_VERSION_GT_46=$(shell expr `$(CC) -dumpversion` ">=" 4.6)
 ifeq ($(GCC_VERSION_GT_46),1)
 GCCFLAGS+= -flto=auto -ffat-lto-objects 
-LDFLAGS=-flto=auto
+LDFLAGS+=-flto=auto
 endif
 
 endif
 
-CFLAGS=$(GCCFLAGS) \
+CFLAGS+=$(GCCFLAGS) \
 	-D_REGEX_LARGE_OFFSETS -D_GNU_SOURCE -DSTDC_HEADERS -DHAVE_SNPRINTF \
 	$(if $(NE_NOWCHAR), -DNOWCHAR,) \
 	$(if $(NE_TEST),    -DNE_TEST -coverage,) \
-	$(if $(NE_DEBUG),   -g -O -fsanitize=address -fsanitize=undefined,-O3 -DNDEBUG) \
+	$(if $(NE_DEBUG),   -g -O -fsanitize=address -fsanitize=undefined,-DNDEBUG) \
 	$(if $(NE_TERMCAP), -DNE_TERMCAP,) \
 	$(if $(NE_ANSI),    -DNE_TERMCAP -DNE_ANSI,) \
 	$(OPTS)