svn commit: trunk/buildroot/package
Author: ulf
Date: 2008-01-10 01:29:06 -0800 (Thu, 10 Jan 2008) New Revision: 20838
Log:
Use host ldconfig, if external toolchain is used
Modified:
trunk/buildroot/package/Makefile.in
Changeset:
Modified: trunk/buildroot/package/Makefile.in
===================================================================
buildroot/package/Makefile.in +4 -0
@@ -121,7 +121,11 @@ TARGET_RANLIB=$(TARGET_CROSS)ranlib TARGET_OBJCOPY=$(TARGET_CROSS)objcopy TARGET_OBJDUMP=$(TARGET_CROSS)objdump +ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +TARGET_LDCONFIG=/sbin/ldconfig +else TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig +endif ifeq ($(BR2_STRIP_strip),y) STRIP_DISCARD_ALL:=--discard-all STRIP_STRIP_UNNEEDED:=--strip-unneeded
buildroot/package/Makefile.in line 128
Quoted 8 lines · ulf at uclibc.org
Log:
Use host ldconfig, if external toolchain is usedbuildroot/package/Makefile.in +4
-0+ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +TARGET_LDCONFIG=/sbin/ldconfig +else TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig +endif
How can that be right? What does it fix?
The cross-ldconfig analyses the cross-libraries to produce a ld.so.cache suitable for the target.
uclibc provies a suitable ldconfig and buildroot is already building me an armeb-uclibc-ldconfig here so everything works fine.
Hamish
Signature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>
Quoted 12 lines · ulf at uclibc.org
buildroot/package/Makefile.in line 128
Quoted 8 lines
Log:
Use host ldconfig, if external toolchain is usedbuildroot/package/Makefile.in +4
-0+ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +TARGET_LDCONFIG=/sbin/ldconfig +else TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig +endifHow can that be right? What does it fix?
You may be right, it may need more complex logic.
Is testing CodeSourcery tools, which does not provide ldconfig. Running /sbin/ldconfig seems to allow the build to complete.
Quoted 6 lines
The cross-ldconfig analyses the cross-libraries to produce a ld.so.cache suitable for the target.
uclibc provies a suitable ldconfig and buildroot is already building me an armeb-uclibc-ldconfig here so everything works fine.
Best Regards
Ulf Samuelsson
Quoted 12 lines · Ulf Samuelsson
Quoted 11 lines · ulf at uclibc.org
buildroot/package/Makefile.in line 128
Quoted 8 lines
Log:
Use host ldconfig, if external toolchain is usedbuildroot/package/Makefile.in +4
-0+ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +TARGET_LDCONFIG=/sbin/ldconfig +else TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig +endifHow can that be right? What does it fix?
Quoted 3 lines
You may be right, it may need more complex logic.
Is testing CodeSourcery tools, which does not provide ldconfig. Running/sbin/ldconfigseems to allow the build to complete.
On my system, /sbin/ldconfig fails if run as a non-root user (can't create temporary file /etc/ld.so.cache~).
Maybe the logic could detect if $(TARGET_CROSS)ldconfig exists and if not, set TARGET_LDCONFIG=/bin/true? (I don't think there is any need to ever run /sbin/ldconfig, because the host's ld.so.cache doesn't need updating.)
ifeq ($(shell which $(TARGET_CROSS)ldconfig),)
TARGET_LDCONFIG=/bin/true
else
TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig
endif
... appears to work here. "type" or "whence" or "command -v" might be more portable than which, I'm not sure. I don't see any way to do it without $(shell ..) though.
cheers
Hamish
Signature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>
You should not write to /etc.
You should write to the project_build_dir/<project>/root/etc
Best Regards
Ulf Samuelsson ulf at atmel.com
Atmel Nordic AB
Mail: Box 2033, 174 02 Sundbyberg, Sweden Visit: Kavalleriv?gen 24, 174 58 Sundbyberg, Sweden
Phone +46 (8) 441 54 22 Fax +46 (8) 441 54 29
GSM +46 (706) 22 44 57
Technical support when I am not available:
AT90 AVR Applications Group: mailto:avr at atmel.com AT91 ARM Applications Group: mailto:at91support at atmel.com
AVR32 Applications Group mailto:avr32 at atmel.com
http://www.avrfreaks.net/; http://avr32linux.org/
http://www.at91.com/ ; ftp://at91dist:distrib at 81.80.104.162/
----- Original Message -----
From: "Hamish Moffatt" <[email protected]>
To: "Ulf Samuelsson" <[email protected]>
Cc: <[email protected]>
Sent: Thursday, January 10, 2008 2:45 PM
Subject: Re: [Buildroot] svn commit: trunk/buildroot/package
Quoted 41 lines · Ulf Samuelsson
Quoted 12 lines
Quoted 11 lines · ulf at uclibc.org
buildroot/package/Makefile.in line 128
Quoted 8 lines
Log:
Use host ldconfig, if external toolchain is usedbuildroot/package/Makefile.in +4
-0+ifeq ($(BR2_TOOLCHAIN_EXTERNAL),y) +TARGET_LDCONFIG=/sbin/ldconfig +else TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig +endifHow can that be right? What does it fix?
Quoted 3 lines
You may be right, it may need more complex logic.
Is testing CodeSourcery tools, which does not provide ldconfig. Running/sbin/ldconfigseems to allow the build to complete.On my system,
/sbin/ldconfigfails if run as a non-root user (can't create temporary file/etc/ld.so.cache~).Maybe the logic could detect if $(TARGET_CROSS)ldconfig exists and if not, set TARGET_LDCONFIG=/bin/true? (I don't think there is any need to ever run
/sbin/ldconfig, because the host's ld.so.cache doesn't need updating.)ifeq ($(shell which $(TARGET_CROSS)ldconfig),)
TARGET_LDCONFIG=/bin/true
else
TARGET_LDCONFIG=$(TARGET_CROSS)ldconfig
endif... appears to work here. "type" or "whence" or "command -v" might be more portable than which, I'm not sure. I don't see any way to do it without $(shell ..) though.
cheers
HamishSignature · 1 line
Hamish Moffatt VK3SB <[email protected]> <[email protected]>