Skip to contentSkip to conversation

distutils.bbclass: override LDSHARED so we use the linker for this build and not the one used in sstate-cache

PATCH Applied Matthew McClintock 3 participants 3 messages Feb 8, 2012 – Feb 10, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 distutils.bbclass: override LDSHARED so we use the linker for this build and not the one used in sstate-cache

Without this fix, when packages are being built using distutils and the python packages were deployed from sstate-cache is it possible that the LD command will contain an invalid sysroot override.

We can fix this by always exported LDSHARED, which is the env var that distutil looks for to override creating shared libraries.

---
 meta/classes/distutils.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/distutils.bbclass +2 -0
index 79b962a..18ae805 100644
@@ -72,3 +72,5 @@ distutils_do_install() {
 }
 
 EXPORT_FUNCTIONS do_compile do_install
+
+export LDSHARED="${CCLD} -shared"
Signature · 1 line
1.7.6.1
#1 lore raw
Quoted 6 lines · Matthew McClintock

Without this fix, when packages are being built using distutils and the python packages were deployed from sstate-cache is it possible that the LD command will contain an invalid sysroot override.

We can fix this by always exported LDSHARED, which is the env var that distutil looks for to override creating shared libraries.

This patch appears to fix [YOCTO #1948] when applied to my Edison branch.

http://bugzilla.pokylinux.org/show_bug.cgi?id=1948

Quoted 1 line
Quoted 14 lines
---
  meta/classes/distutils.bbclass |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/distutils.bbclass +2 -0
index 79b962a..18ae805 100644
@@ -72,3 +72,5 @@ distutils_do_install() {
  }
 
  EXPORT_FUNCTIONS do_compile do_install
+
+export LDSHARED="${CCLD} -shared"
Signature · 3 lines
Joshua Lock
        Yocto Project "Johannes factotum"
        Intel Open Source Technology Centre
Applied
#2 lore raw
In reply to Matthew McClintock
Quoted 17 lines · Matthew McClintock

Without this fix, when packages are being built using distutils and the python packages were deployed from sstate-cache is it possible that the LD command will contain an invalid sysroot override.

We can fix this by always exported LDSHARED, which is the env var that distutil looks for to override creating shared libraries.

---
  meta/classes/distutils.bbclass |    2 ++
  1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/distutils.bbclass +0 -0
index 79b962a..18ae805 100644

meta/classes/distutils.bbclass distutils_do_install() { · line 76

Quoted 5 lines
meta/classes/distutils.bbclass +2 -0
@@ -72,3 +72,5 @@ distutils_do_install() {
  }
 
  EXPORT_FUNCTIONS do_compile do_install
+
+export LDSHARED="${CCLD} -shared"

Merged into OE-core

Thanks
Sau!