All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [RFC] lm-sensors: fix static build
@ 2018-03-08 17:43 Baruch Siach
  2018-03-21  7:25 ` Baruch Siach
  2018-07-05  7:16 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Baruch Siach @ 2018-03-08 17:43 UTC (permalink / raw)
  To: buildroot

Add -static to the link command line to have libgcc resolve libc
symbols. This overrides the default -Wl,-rpath,/usr/lib, which is
useless for static build anyway.

Fixes:
http://autobuild.buildroot.net/results/25d/25d580bee6f609f6b28ebd6cc96d180179901b0e/

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---

I'm not sure this is the right fix. Adding -lc to the failed link
command also fixes the issue. But libc is always a dependency of libgcc.

It is also not clear why this issue appeared now. This is the only
lm-sensors failure in the current autobuilder database. The only recent
change that might be related is the musl bump to 1.1.19.
---
 package/lm-sensors/lm-sensors.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/lm-sensors/lm-sensors.mk b/package/lm-sensors/lm-sensors.mk
index f581b5cd8f21..6fc7ce4981c9 100644
--- a/package/lm-sensors/lm-sensors.mk
+++ b/package/lm-sensors/lm-sensors.mk
@@ -26,7 +26,7 @@ LM_SENSORS_MAKE_OPTS = \
 	PREFIX=/usr
 
 ifeq ($(BR2_STATIC_LIBS),y)
-LM_SENSORS_MAKE_OPTS += BUILD_SHARED_LIB=0
+LM_SENSORS_MAKE_OPTS += BUILD_SHARED_LIB=0 EXLDFLAGS=-static
 else
 LM_SENSORS_MAKE_OPTS += BUILD_SHARED_LIB=1
 endif
-- 
2.16.1

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

* [Buildroot] [RFC] lm-sensors: fix static build
  2018-03-08 17:43 [Buildroot] [RFC] lm-sensors: fix static build Baruch Siach
@ 2018-03-21  7:25 ` Baruch Siach
  2018-07-05  7:16 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Baruch Siach @ 2018-03-21  7:25 UTC (permalink / raw)
  To: buildroot

Hi Buildroot list,

On Thu, Mar 08, 2018 at 07:43:33PM +0200, Baruch Siach wrote:
> Add -static to the link command line to have libgcc resolve libc
> symbols. This overrides the default -Wl,-rpath,/usr/lib, which is
> useless for static build anyway.
> 
> Fixes:
> http://autobuild.buildroot.net/results/25d/25d580bee6f609f6b28ebd6cc96d180179901b0e/
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> 
> I'm not sure this is the right fix. Adding -lc to the failed link
> command also fixes the issue. But libc is always a dependency of libgcc.
> 
> It is also not clear why this issue appeared now. This is the only
> lm-sensors failure in the current autobuilder database. The only recent
> change that might be related is the musl bump to 1.1.19.

It seems like multicat has the same issue with static musl 1.1.19 build:

  http://autobuild.buildroot.net/results/d63/d638bc172183a3ae0c46c8a69bd3f214dedeb0a4/build-end.log

So maybe it is a toolchain issue.

> ---
>  package/lm-sensors/lm-sensors.mk | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/package/lm-sensors/lm-sensors.mk b/package/lm-sensors/lm-sensors.mk
> index f581b5cd8f21..6fc7ce4981c9 100644
> --- a/package/lm-sensors/lm-sensors.mk
> +++ b/package/lm-sensors/lm-sensors.mk
> @@ -26,7 +26,7 @@ LM_SENSORS_MAKE_OPTS = \
>  	PREFIX=/usr
>  
>  ifeq ($(BR2_STATIC_LIBS),y)
> -LM_SENSORS_MAKE_OPTS += BUILD_SHARED_LIB=0
> +LM_SENSORS_MAKE_OPTS += BUILD_SHARED_LIB=0 EXLDFLAGS=-static
>  else
>  LM_SENSORS_MAKE_OPTS += BUILD_SHARED_LIB=1
>  endif

-- 
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

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

* [Buildroot] [RFC] lm-sensors: fix static build
  2018-03-08 17:43 [Buildroot] [RFC] lm-sensors: fix static build Baruch Siach
  2018-03-21  7:25 ` Baruch Siach
@ 2018-07-05  7:16 ` Thomas Petazzoni
  2018-07-19 18:09   ` Peter Korsgaard
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2018-07-05  7:16 UTC (permalink / raw)
  To: buildroot

Hello,

On Thu,  8 Mar 2018 19:43:33 +0200, Baruch Siach wrote:
> Add -static to the link command line to have libgcc resolve libc
> symbols. This overrides the default -Wl,-rpath,/usr/lib, which is
> useless for static build anyway.
> 
> Fixes:
> http://autobuild.buildroot.net/results/25d/25d580bee6f609f6b28ebd6cc96d180179901b0e/
> 
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---

Applied to master, thanks.

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com

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

* [Buildroot] [RFC] lm-sensors: fix static build
  2018-07-05  7:16 ` Thomas Petazzoni
@ 2018-07-19 18:09   ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2018-07-19 18:09 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > Hello,
 > On Thu,  8 Mar 2018 19:43:33 +0200, Baruch Siach wrote:
 >> Add -static to the link command line to have libgcc resolve libc
 >> symbols. This overrides the default -Wl,-rpath,/usr/lib, which is
 >> useless for static build anyway.
 >> 
 >> Fixes:
 >> http://autobuild.buildroot.net/results/25d/25d580bee6f609f6b28ebd6cc96d180179901b0e/
 >> 
 >> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
 >> ---

Committed to 2018.02.x and 2018.05.x, thanks.

-- 
Bye, Peter Korsgaard

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

end of thread, other threads:[~2018-07-19 18:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08 17:43 [Buildroot] [RFC] lm-sensors: fix static build Baruch Siach
2018-03-21  7:25 ` Baruch Siach
2018-07-05  7:16 ` Thomas Petazzoni
2018-07-19 18:09   ` 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.