Skip to contentSkip to conversation

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

PATCH In review Khem Raj 3 participants 3 messages Mar 16, 2018 – Mar 19, 2018

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

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

---
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(-)
meta/recipes-devtools/gcc/gcc-7.3.inc +1 -1
index d56d2c5e06..a80926216b 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}' if '${LINKER_HASH_STYLE}' else ''} \
     --enable-linker-build-id \
     --with-ppl=no \
     --with-cloog=no \
Signature · 1 line
2.16.2
#1 lore raw
Quoted 19 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

---
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(-)
meta/recipes-devtools/gcc/gcc-7.3.inc +0 -0
index d56d2c5e06..a80926216b 100644

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

Quoted 5 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}' 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?

Quoted 11 lines
meta/recipes-devtools/gcc/gcc-7.3.inc +0 -1
     --enable-linker-build-id \
     --with-ppl=no \
     --with-cloog=no \
--

2.16.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#2 lore raw
Quoted 28 lines · Andre McCurdy
Quoted 8 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

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

Review

Quoted 7 lines

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(-)
(quoted diff) +0 -0

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

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

Quoted 9 lines

index d56d2c5e06..a80926216b 100644

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}' if

'${LINKER_HASH_STYLE}' else ''} \

Quoted 2 lines

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