Makefile: Add EXTRA_CFLAGS variable
Distributions packaging dtc may need to set extra flags. Currently when they do that it overrides the ones set by the makefile. This is particularly problematic when compiling without yaml, as the yaml detection is ignored. ld: dtc.o: in function `main': dtc.c:(.text.startup+0x718): undefined reference to `dt_to_yaml' This patch provides a EXTRA_CFLAGS variable that is added to the list of CFLAGS, and can be set on the command line when packaging. Signed-off-by: Joel Stanley <joel@jms.id.au> Message-Id: <20190722030244.9580-1-joel@jms.id.au> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>main
parent
812b1956a0
commit
184f510994
2
Makefile
2
Makefile
|
@ -19,7 +19,7 @@ CONFIG_LOCALVERSION =
|
||||||
CPPFLAGS = -I libfdt -I .
|
CPPFLAGS = -I libfdt -I .
|
||||||
WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
|
WARNINGS = -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
|
||||||
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
|
-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls -Wshadow
|
||||||
CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS)
|
CFLAGS = -g -Os $(SHAREDLIB_CFLAGS) -Werror $(WARNINGS) $(EXTRA_CFLAGS)
|
||||||
|
|
||||||
BISON = bison
|
BISON = bison
|
||||||
LEX = flex
|
LEX = flex
|
||||||
|
|
Loading…
Reference in New Issue