diff mbox series

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

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

Commit Message

Khem Raj March 15, 2018, 1:48 a.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>

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

Christopher Larson March 15, 2018, 1:56 a.m. UTC | #1
On Wed, Mar 14, 2018 at 6:48 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>

> ---

>  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..cc428ad3ef 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}'][d.getVar('LINKER_HASH_STYLE')

> != '']} \

>


That syntax was a hack around the fact that python didn’t have inline if
statements at the time we started the project, but it does now:

    ${@‘—with-linker-hash-style=${LINKER_HASH_STYLE}’ if
‘${LINKER_HASH_STYLE}’ else ‘'}
-- 
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Mar 14, 2018 at 6:48 PM, Khem Raj <span dir="ltr">&lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We allow to set LINKER_HASH_STYLE to be empty so this would fail<br>
since --with-linker-hash-style needs an argument and cant be empty<br>
<br>
Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com">raj.khem@gmail.com</a>&gt;<br>

---<br>
 meta/recipes-devtools/gcc/gcc-<wbr>7.3.inc | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/meta/recipes-devtools/gcc/<wbr>gcc-7.3.inc b/meta/recipes-devtools/gcc/<wbr>gcc-7.3.inc<br>
index d56d2c5e06..cc428ad3ef 100644<br>
--- a/meta/recipes-devtools/gcc/<wbr>gcc-7.3.inc<br>
+++ b/meta/recipes-devtools/gcc/<wbr>gcc-7.3.inc<br>
@@ -100,7 +100,7 @@ EXTRA_OECONF_BASE = &quot;\<br>
     --disable-bootstrap \<br>
     --disable-libmudflap \<br>
     --with-system-zlib \<br>
-    --with-linker-hash-style=${<wbr>LINKER_HASH_STYLE} \<br>
+    ${@[&#39;&#39;,&#39;--with-linker-hash-<wbr>style=${LINKER_HASH_STYLE}&#39;][<wbr>d.getVar(&#39;LINKER_HASH_STYLE&#39;) != &#39;&#39;]} \<br></blockquote><div><br></div><div>That syntax was a hack around the fact that python didn’t have inline if statements at the time we started the project, but it does now:</div><div><br></div><div>    ${@‘—with-linker-hash-style=${LINKER_HASH_STYLE}’ if ‘${LINKER_HASH_STYLE}’ else ‘&#39;}</div></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr">Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div>
</div></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Khem Raj March 15, 2018, 1:59 a.m. UTC | #2
On Wed, Mar 14, 2018 at 6:57 PM Christopher Larson <kergoth@gmail.com>
wrote:

> On Wed, Mar 14, 2018 at 6:48 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>

>> ---

>>  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..cc428ad3ef 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}'][d.getVar('LINKER_HASH_STYLE')

>> != '']} \

>>

>

> That syntax was a hack around the fact that python didn’t have inline if

> statements at the time we started the project, but it does now:

>

>     ${@‘—with-linker-hash-style=${LINKER_HASH_STYLE}’ if

> ‘${LINKER_HASH_STYLE}’ else ‘'}

>


Yes that looks more elegant I will test it out and send another patch

> --

> Christopher Larson

> kergoth at gmail dot com

> Founder - BitBake, OpenEmbedded, OpenZaurus

> Senior Software Engineer, Mentor Graphics

>
<div><br><div class="gmail_quote"><div dir="auto">On Wed, Mar 14, 2018 at 6:57 PM Christopher Larson &lt;<a href="mailto:kergoth@gmail.com">kergoth@gmail.com</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_extra"><div class="gmail_quote">On Wed, Mar 14, 2018 at 6:48 PM, Khem Raj <span>&lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We allow to set LINKER_HASH_STYLE to be empty so this would fail<br>
since --with-linker-hash-style needs an argument and cant be empty<br>
<br>
Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" target="_blank">raj.khem@gmail.com</a>&gt;<br>

---<br>
 meta/recipes-devtools/gcc/gcc-7.3.inc | 2 +-<br>
 1 file changed, 1 insertion(+), 1 deletion(-)<br>
<br>
diff --git a/meta/recipes-devtools/gcc/gcc-7.3.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc<br>
index d56d2c5e06..cc428ad3ef 100644<br>
--- a/meta/recipes-devtools/gcc/gcc-7.3.inc<br>
+++ b/meta/recipes-devtools/gcc/gcc-7.3.inc<br>
@@ -100,7 +100,7 @@ EXTRA_OECONF_BASE = &quot;\<br>
     --disable-bootstrap \<br>
     --disable-libmudflap \<br>
     --with-system-zlib \<br>
-    --with-linker-hash-style=${LINKER_HASH_STYLE} \<br>
+    ${@[&#39;&#39;,&#39;--with-linker-hash-style=${LINKER_HASH_STYLE}&#39;][d.getVar(&#39;LINKER_HASH_STYLE&#39;) != &#39;&#39;]} \<br></blockquote><div><br></div></div></div></div><div><div class="gmail_extra"><div class="gmail_quote"><div>That syntax was a hack around the fact that python didn’t have inline if statements at the time we started the project, but it does now:</div><div><br></div><div>    ${@‘—with-linker-hash-style=${LINKER_HASH_STYLE}’ if ‘${LINKER_HASH_STYLE}’ else ‘&#39;}</div></div></div></div></blockquote><div dir="auto"><br></div><div dir="auto">Yes that looks more elegant I will test it out and send another patch </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="gmail_extra"><div class="gmail_quote"><div></div></div></div></div><div><div class="gmail_extra">-- <br><div class="m_-6433377919948742872gmail_signature" data-smartmail="gmail_signature"><div><div><div>Christopher Larson<br>kergoth at gmail dot com<br>Founder - BitBake, OpenEmbedded, OpenZaurus<br>Senior Software Engineer, Mentor Graphics</div></div></div></div>
</div></div></blockquote></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..cc428ad3ef 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}'][d.getVar('LINKER_HASH_STYLE') != '']} \
     --enable-linker-build-id \
     --with-ppl=no \
     --with-cloog=no \