Patchwork do not pass CFLAGS to gcc while building libcap

login
register
mail settings
Submitter jackie huang
Date June 14, 2013, 8:09 a.m.
Message ID <1371197373-10741-1-git-send-email-jackie.huang@windriver.com>
Download mbox | patch
Permalink /patch/51717/
State New
Headers show

Comments

jackie huang - June 14, 2013, 8:09 a.m.
From: Jackie Huang <jackie.huang@windriver.com>

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>
---
 meta/recipes-support/libcap/libcap.inc |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

--
1.7.4.1
Saul Wold - June 14, 2013, 3:11 p.m.
On 06/14/2013 01:09 AM, jackie.huang@windriver.com wrote:
> From: Jackie Huang <jackie.huang@windriver.com>
>
> 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>
> ---
>   meta/recipes-support/libcap/libcap.inc |    6 ++++--
>   1 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc
> index 2fd5718..5ace7d7 100644
> --- a/meta/recipes-support/libcap/libcap.inc
> +++ b/meta/recipes-support/libcap/libcap.inc
> @@ -12,15 +12,17 @@ DEPENDS_class-native = "perl-native-runtime"
>
>   SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz"
>
> -PR = "r2"
> +PR = "r3"
>
No PR bumps needed here or in your other patch, in this case they cause 
trouble if the 2 patches are not applied in order!

Sau!


>   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 = " \
> --
> 1.7.4.1
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>

Patch

diff --git a/meta/recipes-support/libcap/libcap.inc b/meta/recipes-support/libcap/libcap.inc
index 2fd5718..5ace7d7 100644
--- a/meta/recipes-support/libcap/libcap.inc
+++ b/meta/recipes-support/libcap/libcap.inc
@@ -12,15 +12,17 @@  DEPENDS_class-native = "perl-native-runtime"

 SRC_URI = "${DEBIAN_MIRROR}/main/libc/libcap2/${BPN}2_${PV}.orig.tar.gz"

-PR = "r2"
+PR = "r3"

 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 = " \