Skip to contentSkip to conversation

acpid: modify CFLAGS

PATCH In review Joe Slater 3 participants 3 messages Feb 14, 2013 – Feb 15, 2013

lore
Share & tools
lore

Joe Slater

author
#0 lore raw

PATCH 1/1 acpid: modify CFLAGS

Override the hard-coded CFLAGS used in Makefile
to reference our CFLAGS.

Upstream-Status: Pending

---
 meta/recipes-bsp/acpid/acpid.inc |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
meta/recipes-bsp/acpid/acpid.inc +3 -1
index 3c0219f..1ffe6ff 100644
@@ -13,7 +13,9 @@ inherit update-rc.d
 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}'
Signature · 1 line
1.7.3.4
#1 lore raw
Quoted 3 lines · Joe Slater

Override the hard-coded CFLAGS used in Makefile
to reference our CFLAGS.

Can you be clearer about this?

I just checked the output of the compile log and these flags are set correctly. I also looked at the make -n output via a devshell.

This seems to be hardcoding the CFLAGS into this recipe.

Sounds like something else is going on.

Thanks
Sau!

Quoted 23 lines

Upstream-Status: Pending

---
  meta/recipes-bsp/acpid/acpid.inc |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)
meta/recipes-bsp/acpid/acpid.inc +3 -1
index 3c0219f..1ffe6ff 100644
@@ -13,7 +13,9 @@ inherit update-rc.d
  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}'
#2 lore raw

Thanks for looking at this so quickly.

If I set the optimization to DEBUG_OPTIMIZATION, I see -O0 in CFLAGS, but I see -O2 in log.do_compile. In Makefile, itself, I see

CFLAGS = -W -Wall -Werror -Wundef -Wshadow -D_GNU_SOURCE -O2 -g $(DEFS)

and rather than patch that, I thought it would be easier to just override it.

I am using the acpid recipe from openembedded-core master branch.

Joe

________________________________________
From: Saul Wold [[email protected]]
Sent: Thursday, February 14, 2013 12:24 PM
To: Slater, Joseph
Cc: [email protected]
Subject: Re: [OE-core] [PATCH] acpid: modify CFLAGS

Quoted 3 lines · Joe Slater

Override the hard-coded CFLAGS used in Makefile
to reference our CFLAGS.

Can you be clearer about this?

I just checked the output of the compile log and these flags are set correctly. I also looked at the make -n output via a devshell.

This seems to be hardcoding the CFLAGS into this recipe.

Sounds like something else is going on.

Thanks
Sau!

Quoted 23 lines

Upstream-Status: Pending

---
  meta/recipes-bsp/acpid/acpid.inc |    4 +++-
  1 files changed, 3 insertions(+), 1 deletions(-)
meta/recipes-bsp/acpid/acpid.inc +3 -1
index 3c0219f..1ffe6ff 100644
@@ -13,7 +13,9 @@ inherit update-rc.d
  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}'