adding custom CFLAGS

Denis Vlasenko vda.linux at googlemail.com
Thu Oct 19 17:33:12 UTC 2006


On Wednesday 18 October 2006 21:39, Larry Brigman wrote:
> > > > You can say
> > > > make EXTRA_CFLAGS="-my-fancy-flags" CROSS="i286-hurd-uclibc"
> > > Do you need to do this on the command line for make oldconfig and make all?
> > >
> > I added the EXTRA_CFLAGS on both make oldconfig and make all along with
> > LDFLAGS but it is still trying to link with my workstation libs when my LDFLAGS
> > are pointing elsewhere.
> >
> Is it normal for a cross-compiled version(586-gcc) of busybox to
> search 686 dirs?

Probably. It is done by /lib/ld-linux.so.2, not by binary itself...

> This build should have only linked to my cross-compile libraries.
> Output from strace -ff -o logfile /bin/ash
> execve("/bin/ash", ["/bin/ash"], [/* 8 vars */]) = 0
> uname({sys="Linux", node="10.0.2.15", ...}) = 0
> brk(0)                                  = 0x8106000
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
> open("/etc/ld.so.cache", O_RDONLY)      = -1 ENOENT (No such file or directory)
> open("/lib/tls/i686/sse2/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No
> such file or directory)
> stat64("/lib/tls/i686/sse2", 0xbffff554) = -1 ENOENT (No such file or
> directory)open("/lib/tls/i686/libcrypt.so.1", O_RDONLY) = -1 ENOENT
> (No such file or directory)
> stat64("/lib/tls/i686", 0xbffff554)     = -1 ENOENT (No such file or directory)
> open("/lib/tls/sse2/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> stat64("/lib/tls/sse2", 0xbffff554)     = -1 ENOENT (No such file or directory)
> open("/lib/tls/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
> directory)stat64("/lib/tls", 0xbffff554)          = -1 ENOENT (No such
> file or directory)
> open("/lib/i686/sse2/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such
> file or directory)
> stat64("/lib/i686/sse2", 0xbffff554)    = -1 ENOENT (No such file or directory)
> open("/lib/i686/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> stat64("/lib/i686", 0xbffff554)         = -1 ENOENT (No such file or directory)
> open("/lib/sse2/libcrypt.so.1", O_RDONLY) = -1 ENOENT (No such file or
> directory)
> stat64("/lib/sse2", 0xbffff554)         = -1 ENOENT (No such file or directory)
> open("/lib/libcrypt.so.1", O_RDONLY)    = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0P\10\0\000"...,
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0644, st_size=22048, ...}) = 0



More information about the busybox mailing list