[Buildroot] [git commit branch/2018.05.x] lm-sensors: fix static build

Peter Korsgaard peter at korsgaard.com
Thu Jul 19 17:58:33 UTC 2018


commit: https://git.buildroot.net/buildroot/commit/?id=3d0db9bfcd941d8b81fc7ac97d0e46eb421c82ae
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/2018.05.x

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/25d580bee6f609f6b28ebd6cc96d180179901b0e/

Signed-off-by: Baruch Siach <baruch at tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
(cherry picked from commit b99dbdfac946751deb05e6e0c1f4c44659e15524)
Signed-off-by: Peter Korsgaard <peter at korsgaard.com>
---
 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 f581b5cd8f..6fc7ce4981 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


More information about the buildroot mailing list