Skip to contentSkip to conversation

powertop: Fix build for !uclibc

PATCH In review Martin Jansa 3 participants 3 messages Dec 18, 2014 – Dec 19, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 powertop: Fix build for !uclibc

* EXTRA_LDFLAGS isn't defined for !uclibc and configure fails when it reads it unexpanded, see config.log snippet:

  configure:4177: checking whether the C compiler works
  configure:4199: i586-oe-linux-gcc  -m32 -march=i586 --sysroot=/OE/sysroots/qemux86  -O2 -pipe -g -feliminate-unused-debug-types  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed ${EXTRA_LDFLAGS} conftest.c  >&5
  i586-oe-linux-gcc: error: ${EXTRA_LDFLAGS}: No such file or directory
  configure:4203: $? = 1
  configure:4241: result: no
---
 meta/recipes-kernel/powertop/powertop_2.7.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-kernel/powertop/powertop_2.7.bb +2 -1
index dce5d71..5ba07e9 100644
@@ -14,8 +14,9 @@ SRC_URI[sha256sum] = "8d4b1490e2baad4467c0ded3c423db4472dcbf7b2dd8f8f2a928f54047
 inherit autotools gettext pkgconfig
 
 # we need to explicitly link with libintl in uClibc systems
-LDFLAGS += "${EXTRA_LDFLAGS}"
+EXTRA_LDFLAGS ?= ""
 EXTRA_LDFLAGS_libc-uclibc = "-lintl"
+LDFLAGS += "${EXTRA_LDFLAGS}"
 
 # we do not want libncursesw if we can
 do_configure_prepend() {
Signature · 1 line
2.2.0
#1 lore raw
Quoted 10 lines · Martin Jansa

* EXTRA_LDFLAGS isn't defined for !uclibc and configure fails when it reads it unexpanded, see config.log snippet:

  configure:4177: checking whether the C compiler works
  configure:4199: i586-oe-linux-gcc  -m32 -march=i586 --sysroot=/OE/sysroots/qemux86  -O2 -pipe -g -feliminate-unused-debug-types  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed ${EXTRA_LDFLAGS} conftest.c  >&5
  i586-oe-linux-gcc: error: ${EXTRA_LDFLAGS}: No such file or directory
  configure:4203: $? = 1
  configure:4241: result: no

I hit this issue myself, can confirm that applying this patch fixes it.

Thanks,

Signature · 4 lines
Paul Barker

Email: [email protected]
http://www.paulbarker.me.uk
#2 lore raw
In reply to Martin Jansa
Quoted 3 lines · Martin Jansa
  i586-oe-linux-gcc: error: ${EXTRA_LDFLAGS}: No such file or directory

I'm also seeing cups fail on builds with similar errors:

i586-poky-linux-gcc: error: ${SECURITY_NO_PIE_CLAGS}: No such file or directory

This appears to be down to the recent bitbake merge to master (18cd0) "data: escape $ in shell variable assignment". As this is a fairly drastic change of behaviour to bitbake I think we should revert and revisit the problem.

Ross