diff mbox series

[V3] gcc: Do not use --with-linker-hash-style if LINKER_HASH_STYLE is empty

Message ID 20180316214112.42299-1-raj.khem@gmail.com
State Superseded
Headers show
Series [V3] gcc: Do not use --with-linker-hash-style if LINKER_HASH_STYLE is empty | expand

Commit Message

Khem Raj March 16, 2018, 9:41 p.m. UTC
We allow to set LINKER_HASH_STYLE to be empty so this would fail
since --with-linker-hash-style needs an argument and cant be empty

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
Changes in v3:
- Fix typo in gcc option

Changes in v2:
- Use inline if statement instead of old syntax

 meta/recipes-devtools/gcc/gcc-7.3.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.16.2

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Comments

Andre McCurdy March 16, 2018, 9:43 p.m. UTC | #1
On Fri, Mar 16, 2018 at 2:41 PM, Khem Raj <raj.khem@gmail.com> wrote:
> We allow to set LINKER_HASH_STYLE to be empty so this would fail

> since --with-linker-hash-style needs an argument and cant be empty

>

> Signed-off-by: Khem Raj <raj.khem@gmail.com>

> ---

> Changes in v3:

> - Fix typo in gcc option

>

> Changes in v2:

> - Use inline if statement instead of old syntax

>

>  meta/recipes-devtools/gcc/gcc-7.3.inc | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc

> index d56d2c5e06..a80926216b 100644

> --- a/meta/recipes-devtools/gcc/gcc-7.3.inc

> +++ b/meta/recipes-devtools/gcc/gcc-7.3.inc

> @@ -100,7 +100,7 @@ EXTRA_OECONF_BASE = "\

>      --disable-bootstrap \

>      --disable-libmudflap \

>      --with-system-zlib \

> -    --with-linker-hash-style=${LINKER_HASH_STYLE} \

> +    ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \


What are the rules about when to use d.getVar('FOO') -vs- when to use
${FOO} in python fragments like this?

>      --enable-linker-build-id \

>      --with-ppl=no \

>      --with-cloog=no \

> --

> 2.16.2

>

> --

> _______________________________________________

> Openembedded-core mailing list

> Openembedded-core@lists.openembedded.org

> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Ross Burton March 19, 2018, 12:53 p.m. UTC | #2
On 16 March 2018 at 21:43, Andre McCurdy <armccurdy@gmail.com> wrote:

> On Fri, Mar 16, 2018 at 2:41 PM, Khem Raj <raj.khem@gmail.com> wrote:

> > We allow to set LINKER_HASH_STYLE to be empty so this would fail

> > since --with-linker-hash-style needs an argument and cant be empty

> >

> > Signed-off-by: Khem Raj <raj.khem@gmail.com>

> > ---

> > Changes in v3:

> > - Fix typo in gcc option

> >

> > Changes in v2:

> > - Use inline if statement instead of old syntax

> >

> >  meta/recipes-devtools/gcc/gcc-7.3.inc | 2 +-

> >  1 file changed, 1 insertion(+), 1 deletion(-)

> >

> > diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc

> b/meta/recipes-devtools/gcc/gcc-7.3.inc

> > index d56d2c5e06..a80926216b 100644

> > --- a/meta/recipes-devtools/gcc/gcc-7.3.inc

> > +++ b/meta/recipes-devtools/gcc/gcc-7.3.inc

> > @@ -100,7 +100,7 @@ EXTRA_OECONF_BASE = "\

> >      --disable-bootstrap \

> >      --disable-libmudflap \

> >      --with-system-zlib \

> > -    --with-linker-hash-style=${LINKER_HASH_STYLE} \

> > +    ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if

> '${LINKER_HASH_STYLE}' else ''} \

>

> What are the rules about when to use d.getVar('FOO') -vs- when to use

> ${FOO} in python fragments like this?



I just had to test this in another recipe to verify it does what you expect.

${FOO} isn't expanded anymore in python functions, but it does get expanded
inside python expansions.

Ross
<div dir="ltr">On 16 March 2018 at 21:43, Andre McCurdy <span dir="ltr">&lt;<a href="mailto:armccurdy@gmail.com" target="_blank">armccurdy@gmail.com</a>&gt;</span> wrote:<br><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Mar 16, 2018 at 2:41 PM, Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt; wrote:<br>
&gt; We allow to set LINKER_HASH_STYLE to be empty so this would fail<br>
&gt; since --with-linker-hash-style needs an argument and cant be empty<br>
&gt;<br>
&gt; Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>
&gt; ---<br>
&gt; Changes in v3:<br>
&gt; - Fix typo in gcc option<br>
&gt;<br>
&gt; Changes in v2:<br>
&gt; - Use inline if statement instead of old syntax<br>
&gt;<br>
&gt;  meta/recipes-devtools/gcc/gcc-<wbr>7.3.inc | 2 +-<br>
&gt;  1 file changed, 1 insertion(+), 1 deletion(-)<br>
&gt;<br>
&gt; diff --git a/meta/recipes-devtools/gcc/<wbr>gcc-7.3.inc b/meta/recipes-devtools/gcc/<wbr>gcc-7.3.inc<br>
&gt; index d56d2c5e06..a80926216b 100644<br>
&gt; --- a/meta/recipes-devtools/gcc/<wbr>gcc-7.3.inc<br>
&gt; +++ b/meta/recipes-devtools/gcc/<wbr>gcc-7.3.inc<br>
&gt; @@ -100,7 +100,7 @@ EXTRA_OECONF_BASE = &quot;\<br>
&gt;      --disable-bootstrap \<br>
&gt;      --disable-libmudflap \<br>
&gt;      --with-system-zlib \<br>
&gt; -    --with-linker-hash-style=${<wbr>LINKER_HASH_STYLE} \<br>
&gt; +    ${@&#39;--with-linker-hash-style=$<wbr>{LINKER_HASH_STYLE}&#39; if &#39;${LINKER_HASH_STYLE}&#39; else &#39;&#39;} \<br>
<br>
</span>What are the rules about when to use d.getVar(&#39;FOO&#39;) -vs- when to use<br>
${FOO} in python fragments like this?</blockquote><div><br></div><div>I just had to test this in another recipe to verify it does what you expect.</div><div><br></div><div>${FOO} isn&#39;t expanded anymore in python functions, but it does get expanded inside python expansions.</div><div><br></div><div>Ross</div></div></div></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc
index d56d2c5e06..a80926216b 100644
--- a/meta/recipes-devtools/gcc/gcc-7.3.inc
+++ b/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -100,7 +100,7 @@  EXTRA_OECONF_BASE = "\
     --disable-bootstrap \
     --disable-libmudflap \
     --with-system-zlib \
-    --with-linker-hash-style=${LINKER_HASH_STYLE} \
+    ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \
     --enable-linker-build-id \
     --with-ppl=no \
     --with-cloog=no \