[3/21] cmake.bbclass: modify construction of compiler flags

Submitted by Mark Hatle on May 29, 2013, 3:09 p.m. | Patch ID: 50709


Message ID 1369840203-21898-4-git-send-email-mark.hatle@windriver.com
State Accepted
Commit 558662927be550aeb8dd163f65e16b1750bbd127
Headers show

Commit Message

Mark Hatle May 29, 2013, 3:09 p.m.
From: Joe Slater <jslater@windriver.com>

Use CFLAGS instead of CPPFLAGS for C_FLAGS variants.

When debug optimization is enabled in the local.conf, the debug (-O0) vs
production (-O2) does not change in the builds.  As the CPPFLAGS do not
contain the optimization settings.

Also the CXX_FLAGS are based on CXXFLAGS, so it makes sense to similarly 
set the C_FLAGS based on CFLAGS.

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
 meta/classes/cmake.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass
index e64c30c..310242e 100644
--- a/meta/classes/cmake.bbclass
+++ b/meta/classes/cmake.bbclass
@@ -20,9 +20,9 @@  OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`"
 OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`"
 # Compiler flags