Override the hard-coded CFLAGS used in Makefile to reference our CFLAGS.
Without this patch if the DEBUG_OPTIMIZATION is enabled (using -O0) the
compile log shows acpid still using -O2 because the Makefile has various
hard coded CFLAGS defined. Instead of using the hard coded CFLAGS,
we simply define the proper set within the recipe itself.
Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
INITSCRIPT_NAME = "acpid"
INITSCRIPT_PARAMS = "defaults"
-EXTRA_OEMAKE = ""
+# Makefile ignores our CFLAGS, so override it.
+#
+EXTRA_OEMAKE = "CFLAGS='-W -Wall -Werror -Wundef -Wshadow ${CFLAGS} $(DEFS)'"
do_compile () {
oe_runmake 'CC=${CC} -D_GNU_SOURCE' 'CROSS=${HOST_PREFIX}'