Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] do not pass CFLAGS to gcc while building libcap
@ 2013-06-14  8:09 jackie.huang
  2013-06-14 15:11 ` Saul Wold
  0 siblings, 1 reply; 2+ messages in thread
From: jackie.huang @ 2013-06-14  8:09 UTC (permalink / raw)
  To: openembedded-core

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"

 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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] do not pass CFLAGS to gcc while building libcap
  2013-06-14  8:09 [PATCH] do not pass CFLAGS to gcc while building libcap jackie.huang
@ 2013-06-14 15:11 ` Saul Wold
  0 siblings, 0 replies; 2+ messages in thread
From: Saul Wold @ 2013-06-14 15:11 UTC (permalink / raw)
  To: jackie.huang; +Cc: openembedded-core

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
>
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-06-14 15:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-14  8:09 [PATCH] do not pass CFLAGS to gcc while building libcap jackie.huang
2013-06-14 15:11 ` Saul Wold

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox