All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] openvswitch: Fix compile problems with i586-nlp
@ 2017-08-25 20:13 Jason Wessel
  2017-08-29 12:44 ` Bruce Ashfield
  0 siblings, 1 reply; 2+ messages in thread
From: Jason Wessel @ 2017-08-25 20:13 UTC (permalink / raw)
  To: meta-virtualization

If you have in your $CC from the compiler template any kind of
directive which contains a comma character it is going to cause ovs to
not build due to the macro expansion in the Makefile:

CC = $(if $(C),env REAL_CC="'"$CC"'" CHECK="$(SPARSE) -I $(top_srcdir)/include/sparse $(SPARSEFLAGS) $(SPARSE_EXTRA_INCLUDES) " cgcc $(CGCCFLAGS),'"$CC"

Put more simply:

CC = $(if $(C), CONFIGURE_CC_DEFINITION, cgcc args CONFIGURE_CC_DEFINITION)

The CONFIGURE_CC_DEFINITION for the i585-nlp definition had
"-Wa,-momit-lock-prefix=yes".  The comma there caused a strings to
"break" in the wrong place in the $(if) macro and the build of recipe
will fail with the error shown below:

/bin/sh: -c: line 1: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 3: syntax error: unexpected end of file

The solution is to transform the "-Wa," -> "-Xassembler ".

Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
---
 recipes-networking/openvswitch/openvswitch.inc | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/recipes-networking/openvswitch/openvswitch.inc b/recipes-networking/openvswitch/openvswitch.inc
index ab5a7e4..58e0fcb 100644
--- a/recipes-networking/openvswitch/openvswitch.inc
+++ b/recipes-networking/openvswitch/openvswitch.inc
@@ -86,6 +86,12 @@ INITSCRIPT_PARAMS_${PN}-switch = "defaults 71"
 INITSCRIPT_NAME_${PN}-testcontroller = "openvswitch-testcontroller"
 INITSCRIPT_PARAMS_${PN}-testcontroller = "defaults 72"
 
+do_configure_prepend() {
+	# Work around the for Makefile CC=$(if ....) by swapping out any
+	# "-Wa," assembly directives with "-Xassembler
+	CC=`echo '${CC}' | sed 's/-Wa,/-Xassembler /g'`
+}
+
 do_install_append() {
 	install -d ${D}/${sysconfdir}/default/
 	install -m 660 ${WORKDIR}/openvswitch-switch-setup ${D}/${sysconfdir}/default/openvswitch-switch
-- 
2.11.0



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

* Re: [PATCH] openvswitch: Fix compile problems with i586-nlp
  2017-08-25 20:13 [PATCH] openvswitch: Fix compile problems with i586-nlp Jason Wessel
@ 2017-08-29 12:44 ` Bruce Ashfield
  0 siblings, 0 replies; 2+ messages in thread
From: Bruce Ashfield @ 2017-08-29 12:44 UTC (permalink / raw)
  To: Jason Wessel; +Cc: meta-virtualization

[-- Attachment #1: Type: text/plain, Size: 2393 bytes --]

merged.

Bruce

On Fri, Aug 25, 2017 at 4:13 PM, Jason Wessel <jason.wessel@windriver.com>
wrote:

> If you have in your $CC from the compiler template any kind of
> directive which contains a comma character it is going to cause ovs to
> not build due to the macro expansion in the Makefile:
>
> CC = $(if $(C),env REAL_CC="'"$CC"'" CHECK="$(SPARSE) -I
> $(top_srcdir)/include/sparse $(SPARSEFLAGS) $(SPARSE_EXTRA_INCLUDES) " cgcc
> $(CGCCFLAGS),'"$CC"
>
> Put more simply:
>
> CC = $(if $(C), CONFIGURE_CC_DEFINITION, cgcc args CONFIGURE_CC_DEFINITION)
>
> The CONFIGURE_CC_DEFINITION for the i585-nlp definition had
> "-Wa,-momit-lock-prefix=yes".  The comma there caused a strings to
> "break" in the wrong place in the $(if) macro and the build of recipe
> will fail with the error shown below:
>
> /bin/sh: -c: line 1: unexpected EOF while looking for matching `"'
> /bin/sh: -c: line 3: syntax error: unexpected end of file
>
> The solution is to transform the "-Wa," -> "-Xassembler ".
>
> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
> ---
>  recipes-networking/openvswitch/openvswitch.inc | 6 ++++++
>  1 file changed, 6 insertions(+)
>
> diff --git a/recipes-networking/openvswitch/openvswitch.inc
> b/recipes-networking/openvswitch/openvswitch.inc
> index ab5a7e4..58e0fcb 100644
> --- a/recipes-networking/openvswitch/openvswitch.inc
> +++ b/recipes-networking/openvswitch/openvswitch.inc
> @@ -86,6 +86,12 @@ INITSCRIPT_PARAMS_${PN}-switch = "defaults 71"
>  INITSCRIPT_NAME_${PN}-testcontroller = "openvswitch-testcontroller"
>  INITSCRIPT_PARAMS_${PN}-testcontroller = "defaults 72"
>
> +do_configure_prepend() {
> +       # Work around the for Makefile CC=$(if ....) by swapping out any
> +       # "-Wa," assembly directives with "-Xassembler
> +       CC=`echo '${CC}' | sed 's/-Wa,/-Xassembler /g'`
> +}
> +
>  do_install_append() {
>         install -d ${D}/${sysconfdir}/default/
>         install -m 660 ${WORKDIR}/openvswitch-switch-setup
> ${D}/${sysconfdir}/default/openvswitch-switch
> --
> 2.11.0
>
> --
> _______________________________________________
> meta-virtualization mailing list
> meta-virtualization@yoctoproject.org
> https://lists.yoctoproject.org/listinfo/meta-virtualization
>



-- 
"Thou shalt not follow the NULL pointer, for chaos and madness await thee
at its end"

[-- Attachment #2: Type: text/html, Size: 3442 bytes --]

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

end of thread, other threads:[~2017-08-29 12:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-25 20:13 [PATCH] openvswitch: Fix compile problems with i586-nlp Jason Wessel
2017-08-29 12:44 ` Bruce Ashfield

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.