Skip to contentSkip to conversation

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

PATCH Superseded Khem Raj 2 participants 3 messages Mar 15, 2018

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

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

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

---
 meta/recipes-devtools/gcc/gcc-7.3.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-7.3.inc +1 -1
index d56d2c5e06..cc428ad3ef 100644
@@ -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 \
Signature · 1 line
2.16.2
#1 lore raw
Quoted 14 lines · Khem Raj

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

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

meta/recipes-devtools/gcc/gcc-7.3.inc EXTRA_OECONF_BASE = "\ · line 105

Quoted 7 lines
meta/recipes-devtools/gcc/gcc-7.3.inc +1 -1
@@ -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 ‘'}

Signature · 4 lines
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics
author
#2 lore raw
Quoted 28 lines · Christopher Larson
Quoted 14 lines · Khem Raj

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

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

meta/recipes-devtools/gcc/gcc-7.3.inc EXTRA_OECONF_BASE = "\ · line 106

Quoted 8 lines
meta/recipes-devtools/gcc/gcc-7.3.inc +1 -1
@@ -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:

Quoted 3 lines
    ${@‘—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

Quoted 6 lines

--
Christopher Larson
kergoth at gmail dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Senior Software Engineer, Mentor Graphics