All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] flashrom: fix static build with uClibc
@ 2017-09-20  8:17 Baruch Siach
  2017-09-21 19:32 ` Peter Korsgaard
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Baruch Siach @ 2017-09-20  8:17 UTC (permalink / raw)
  To: buildroot

Define HAVE_STRNLEN to avoid local strnlen() definition.

Fixes:
http://autobuild.buildroot.net/results/7dc/7dc4298e3a07c73e03f70205516d68a0f4c2d297/
http://autobuild.buildroot.net/results/e36/e362848eb45f6b8100131361e6e5faa546f0bbd8/
http://autobuild.buildroot.net/results/69e/69ef10ec710f418b4d10c1edb4f2ce2e49b522bf/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
It seems like only uClibc is affected. Build with musl succeeds even
though the resulting binary contains a global strnlen symbol.
---
 package/flashrom/flashrom.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/flashrom/flashrom.mk b/package/flashrom/flashrom.mk
index 4ecdce8f4136..f9ab6294a524 100644
--- a/package/flashrom/flashrom.mk
+++ b/package/flashrom/flashrom.mk
@@ -12,7 +12,8 @@ FLASHROM_LICENSE = GPL-2.0+
 FLASHROM_LICENSE_FILES = COPYING
 
 define FLASHROM_BUILD_CMDS
-	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
+	$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) \
+		CFLAGS="$(TARGET_CFLAGS) -DHAVE_STRNLEN" -C $(@D)
 endef
 
 define FLASHROM_INSTALL_TARGET_CMDS
-- 
2.14.1

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] flashrom: fix static build with uClibc
  2017-09-20  8:17 [Buildroot] [PATCH] flashrom: fix static build with uClibc Baruch Siach
@ 2017-09-21 19:32 ` Peter Korsgaard
  2017-09-21 20:53 ` Arnout Vandecappelle
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2017-09-21 19:32 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > Define HAVE_STRNLEN to avoid local strnlen() definition.
 > Fixes:
 > http://autobuild.buildroot.net/results/7dc/7dc4298e3a07c73e03f70205516d68a0f4c2d297/
 > http://autobuild.buildroot.net/results/e36/e362848eb45f6b8100131361e6e5faa546f0bbd8/
 > http://autobuild.buildroot.net/results/69e/69ef10ec710f418b4d10c1edb4f2ce2e49b522bf/

 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 > ---
 > It seems like only uClibc is affected. Build with musl succeeds even
 > though the resulting binary contains a global strnlen symbol.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] flashrom: fix static build with uClibc
  2017-09-20  8:17 [Buildroot] [PATCH] flashrom: fix static build with uClibc Baruch Siach
  2017-09-21 19:32 ` Peter Korsgaard
@ 2017-09-21 20:53 ` Arnout Vandecappelle
  2017-09-22  7:01 ` Peter Korsgaard
  2017-10-16 22:00 ` Peter Korsgaard
  3 siblings, 0 replies; 5+ messages in thread
From: Arnout Vandecappelle @ 2017-09-21 20:53 UTC (permalink / raw)
  To: buildroot



On 20-09-17 10:17, Baruch Siach wrote:
> Define HAVE_STRNLEN to avoid local strnlen() definition.
> 
> Fixes:
> http://autobuild.buildroot.net/results/7dc/7dc4298e3a07c73e03f70205516d68a0f4c2d297/
> http://autobuild.buildroot.net/results/e36/e362848eb45f6b8100131361e6e5faa546f0bbd8/
> http://autobuild.buildroot.net/results/69e/69ef10ec710f418b4d10c1edb4f2ce2e49b522bf/
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> It seems like only uClibc is affected. Build with musl succeeds even
> though the resulting binary contains a global strnlen symbol.

 musl puts strnlen in a separate strnlen.o file. Since linking is done per
object file, and there is no undefined symbol that pulls in strnlen.o (since
strnlen is already defined), it will just use the flashrom version of the function.

 uClibc also puts strnlen in a separate object file. However, that object file
also contain the hidden symbol __GI_strnlen which is referred to from other
object files in the archive (e.g. vfprintf). Therefore, strnlen.o will be linked
in and you get a double definition.

 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] flashrom: fix static build with uClibc
  2017-09-20  8:17 [Buildroot] [PATCH] flashrom: fix static build with uClibc Baruch Siach
  2017-09-21 19:32 ` Peter Korsgaard
  2017-09-21 20:53 ` Arnout Vandecappelle
@ 2017-09-22  7:01 ` Peter Korsgaard
  2017-10-16 22:00 ` Peter Korsgaard
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2017-09-22  7:01 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > Define HAVE_STRNLEN to avoid local strnlen() definition.
 > Fixes:
 > http://autobuild.buildroot.net/results/7dc/7dc4298e3a07c73e03f70205516d68a0f4c2d297/
 > http://autobuild.buildroot.net/results/e36/e362848eb45f6b8100131361e6e5faa546f0bbd8/
 > http://autobuild.buildroot.net/results/69e/69ef10ec710f418b4d10c1edb4f2ce2e49b522bf/

 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 > ---
 > It seems like only uClibc is affected. Build with musl succeeds even
 > though the resulting binary contains a global strnlen symbol.

Committed to 2017.02.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Buildroot] [PATCH] flashrom: fix static build with uClibc
  2017-09-20  8:17 [Buildroot] [PATCH] flashrom: fix static build with uClibc Baruch Siach
                   ` (2 preceding siblings ...)
  2017-09-22  7:01 ` Peter Korsgaard
@ 2017-10-16 22:00 ` Peter Korsgaard
  3 siblings, 0 replies; 5+ messages in thread
From: Peter Korsgaard @ 2017-10-16 22:00 UTC (permalink / raw)
  To: buildroot

>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:

 > Define HAVE_STRNLEN to avoid local strnlen() definition.
 > Fixes:
 > http://autobuild.buildroot.net/results/7dc/7dc4298e3a07c73e03f70205516d68a0f4c2d297/
 > http://autobuild.buildroot.net/results/e36/e362848eb45f6b8100131361e6e5faa546f0bbd8/
 > http://autobuild.buildroot.net/results/69e/69ef10ec710f418b4d10c1edb4f2ce2e49b522bf/

 > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 > ---
 > It seems like only uClibc is affected. Build with musl succeeds even
 > though the resulting binary contains a global strnlen symbol.

Committed to 2017.08.x, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-10-16 22:00 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-20  8:17 [Buildroot] [PATCH] flashrom: fix static build with uClibc Baruch Siach
2017-09-21 19:32 ` Peter Korsgaard
2017-09-21 20:53 ` Arnout Vandecappelle
2017-09-22  7:01 ` Peter Korsgaard
2017-10-16 22:00 ` Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.