diff options
author | Joe Slater <jslater@windriver.com> | 2013-05-29 10:09:45 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-05-29 22:18:49 +0100 |
commit | 84de4f5b4030a25bbbf9d1adb663092c2f570b6e (patch) | |
tree | 2416702dd4b831384add5aa2cacbcee11d36eaec /meta/classes | |
parent | e4967e668f5947670c6c7ec5c745785dd2b6e8fb (diff) | |
download | poky-84de4f5b4030a25bbbf9d1adb663092c2f570b6e.tar.gz |
cmake.bbclass: modify construction of compiler flags
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.
(From OE-Core rev: 558662927be550aeb8dd163f65e16b1750bbd127)
Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Jeff Polk <jeff.polk@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/cmake.bbclass | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/meta/classes/cmake.bbclass b/meta/classes/cmake.bbclass index e64c30c412..310242ec27 100644 --- a/meta/classes/cmake.bbclass +++ b/meta/classes/cmake.bbclass | |||
@@ -20,9 +20,9 @@ OECMAKE_C_COMPILER ?= "`echo ${CC} | sed 's/^\([^ ]*\).*/\1/'`" | |||
20 | OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`" | 20 | OECMAKE_CXX_COMPILER ?= "`echo ${CXX} | sed 's/^\([^ ]*\).*/\1/'`" |
21 | 21 | ||
22 | # Compiler flags | 22 | # Compiler flags |
23 | OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS}" | 23 | OECMAKE_C_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CFLAGS}" |
24 | OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} -fpermissive" | 24 | OECMAKE_CXX_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} -fpermissive" |
25 | OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CPPFLAGS} -DNDEBUG" | 25 | OECMAKE_C_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CFLAGS} -DNDEBUG" |
26 | OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG" | 26 | OECMAKE_CXX_FLAGS_RELEASE ?= "${SELECTED_OPTIMIZATION} ${CXXFLAGS} -DNDEBUG" |
27 | OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}" | 27 | OECMAKE_C_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CPPFLAGS} ${LDFLAGS}" |
28 | OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}" | 28 | OECMAKE_CXX_LINK_FLAGS ?= "${HOST_CC_ARCH} ${TOOLCHAIN_OPTIONS} ${CXXFLAGS} ${LDFLAGS}" |