]> code.ossystems Code Review - openembedded-core.git/commitdiff
libcap: do not pass CFLAGS to gcc
authorJackie Huang <jackie.huang@windriver.com>
Fri, 14 Jun 2013 08:09:33 +0000 (16:09 +0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 17 Jun 2013 15:44:36 +0000 (16:44 +0100)
During do_configure(), we modify the BUILD_CFLAGS used
but do not remove the default inclusion of CFLAGS
in BUILD_CFLAGS.  This fix removes CFLAGS inclusion
by modifying do_configure().

Signed-off-by: Joe Slater <jslater@windriver.com>
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
meta/recipes-support/libcap/libcap.inc

index 7f16a569c8acbde11004f9cfe961db9f1c8bc880..772057f5107d2f7b8157b1ad2f3afd0feddaa7af 100644 (file)
@@ -16,11 +16,13 @@ PR = "r1"
 
 inherit lib_package
 
+# do NOT pass target cflags to host compilations
+#
 do_configure() {
        # libcap uses := for compilers, fortunately, it gives us a hint
        # on what should be replaced with ?=
        sed -e 's,:=,?=,g' -i Make.Rules
-       sed -e 's,BUILD_CFLAGS ?=,BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules
+       sed -e 's,^BUILD_CFLAGS ?= $(CFLAGS),BUILD_CFLAGS := $(BUILD_CFLAGS),' -i Make.Rules
 }
 
 EXTRA_OEMAKE = " \