[Buildroot] svn commit: trunk/buildroot/package
Hamish Moffatt
hamish at cloud.net.au
Thu Jan 10 05:45:11 PST 2008
On Thu, Jan 10, 2008 at 12:04:18PM +0100, Ulf Samuelsson wrote:
> > On Thu, Jan 10, 2008 at 01:29:06AM -0800, ulf at uclibc.org wrote:
> >> Log:
> >> Use host ldconfig, if external toolchain is used
> >>
> >> +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?
>
> 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.
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
--
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>
More information about the buildroot
mailing list