All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] skalibs: make ld use dummy file when configuring
@ 2016-12-30 21:55 Eric Le Bihan
  2017-01-01  8:35 ` Thomas Petazzoni
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Le Bihan @ 2016-12-30 21:55 UTC (permalink / raw)
  To: buildroot

For some architectures, like Xtensa or HPPA, ld from binutils requires
the output file to be a regular file, as mentioned in a bug report on
the mailing list [1].

So, use a dummy file as output file for ld, instead of /dev/null, when
trying to detect some libraries at configuration time.

Fixes http://autobuild.buildroot.net/results/288/288fc31cd10ffe3cd93371c7be37d79452a91768/

[1] https://sourceware.org/bugzilla/show_bug.cgi?id=19526

Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
---
 ...e-linker-use-dummy-file-when-testing-libs.patch | 44 ++++++++++++++++++++++
 1 file changed, 44 insertions(+)
 create mode 100644 package/skalibs/0003-Make-linker-use-dummy-file-when-testing-libs.patch

diff --git a/package/skalibs/0003-Make-linker-use-dummy-file-when-testing-libs.patch b/package/skalibs/0003-Make-linker-use-dummy-file-when-testing-libs.patch
new file mode 100644
index 0000000..ef0e173
--- /dev/null
+++ b/package/skalibs/0003-Make-linker-use-dummy-file-when-testing-libs.patch
@@ -0,0 +1,44 @@
+From da293110f429e1206728c1551cf0f6b462b3d8c0 Mon Sep 17 00:00:00 2001
+From: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+Date: Thu, 29 Dec 2016 19:36:24 +0100
+Subject: [PATCH] Make linker use dummy file when testing libs
+
+For some architectures, like Xtensa or HPPA, ld from binutils requires
+the output file to be a regular file, as mentioned in a bug report on
+the mailing list [1].
+
+So, use a dummy file as output file for ld in trylibs(), instead of
+/dev/null.
+
+[1] https://sourceware.org/bugzilla/show_bug.cgi?id=19526
+
+Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
+---
+ configure | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/configure b/configure
+index 1579025..12980fb 100755
+--- a/configure
++++ b/configure
+@@ -173,7 +173,7 @@ trylibs () {
+   echo "Checking whether system has $2..." >&3
+   shift 2
+   if $CC_AUTO $CPPFLAGS_AUTO $CFLAGS_AUTO -c -o try$name.o src/sysdeps/try$name.c 2>/dev/null ; then
+-    until $CC_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o /dev/null try$name.o $args 2>/dev/null ; do
++    until $CC_AUTO $CFLAGS_AUTO $LDFLAGS_AUTO -o try$name try$name.o $args 2>/dev/null ; do
+       if test -z "$*" ; then
+         rm -f try$name.o
+         echo
+@@ -189,7 +189,7 @@ trylibs () {
+     else
+       echo "  ... yes, with$args" >&3
+     fi
+-    rm -f try$name.o
++    rm -f try$name.o try$name
+     return 0
+   else
+     echo
+-- 
+2.4.11
+
-- 
2.4.11

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

* [Buildroot] [PATCH] skalibs: make ld use dummy file when configuring
  2016-12-30 21:55 [Buildroot] [PATCH] skalibs: make ld use dummy file when configuring Eric Le Bihan
@ 2017-01-01  8:35 ` Thomas Petazzoni
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2017-01-01  8:35 UTC (permalink / raw)
  To: buildroot

Hello,

On Fri, 30 Dec 2016 22:55:10 +0100, Eric Le Bihan wrote:
> For some architectures, like Xtensa or HPPA, ld from binutils requires
> the output file to be a regular file, as mentioned in a bug report on
> the mailing list [1].
> 
> So, use a dummy file as output file for ld, instead of /dev/null, when
> trying to detect some libraries at configuration time.
> 
> Fixes http://autobuild.buildroot.net/results/288/288fc31cd10ffe3cd93371c7be37d79452a91768/
> 
> [1] https://sourceware.org/bugzilla/show_bug.cgi?id=19526
> 
> Signed-off-by: Eric Le Bihan <eric.le.bihan.dev@free.fr>
> ---
>  ...e-linker-use-dummy-file-when-testing-libs.patch | 44 ++++++++++++++++++++++
>  1 file changed, 44 insertions(+)
>  create mode 100644 package/skalibs/0003-Make-linker-use-dummy-file-when-testing-libs.patch

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

end of thread, other threads:[~2017-01-01  8:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-30 21:55 [Buildroot] [PATCH] skalibs: make ld use dummy file when configuring Eric Le Bihan
2017-01-01  8:35 ` Thomas Petazzoni

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.