f070692c0fe633b5e68a94b344f95a7b490b2fda
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / dtc / 0002-extra-cflags.patch
1 Makefile: append the CFLAGS to existing ones
2
3 Allow the user to pass custom CFLAGS (eg. optimisation flags).
4
5 Do not use EXTRA_CFLAGS, append to existing CFLAGS with +=  (Arnout)
6
7 Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
8 Cc: Arnout Vandecappelle <arnout@mind.be>
9
10 ---
11 Patch not sent upstream.
12
13 Although not specific to buildroot, I am not sure this is the best
14 way to handle user-supplied CFLAGS.
15
16 diff --git a/Makefile b/Makefile
17 index 962f94eba661..bf6b317158cf 100644
18 --- a/Makefile
19 +++ b/Makefile
20 @@ -16,9 +16,10 @@ LOCAL_VERSION =
21  CONFIG_LOCALVERSION =
22  
23  CPPFLAGS = -I libfdt -I .
24 -WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
25 +WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
26         -Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
27 -CFLAGS = -g -Os -fPIC -Werror $(WARNINGS)
28 +CFLAGS ?= -g -Os
29 +CFLAGS += -fPIC $(WARNINGS)
30  
31  BISON = bison
32  LEX = flex