I'm having problems building against uClibc.. It seems that it always wants to link in gcc-lib too. How can I stop it ? Here are some examples
Starting with Busybox, I get a lot of duplicate definitions
$ make gcc -s -Wl,-warn-common --static -o busybox ash.o basename.o cat.o chgrp.o chmod .o chown.o chroot.o chvt.o clear.o cmdedit.o cp.o cut.o date.o dd.o df.o dirname .o dmesg.o du.o echo.o env.o find.o free.o grep.o gunzip.o gzip.o halt.o head.o id.o init.o kill.o klogd.o ln.o logger.o ls.o lsmod.o mkdir.o mknod.o mkswap.o m odprobe.o more.o mount.o mv.o pidof.o poweroff.o ps.o pwd.o reboot.o reset.o rm. o rmdir.o sed.o sleep.o sort.o swaponoff.o sync.o syslogd.o tail.o tar.o test.o touch.o true_false.o tty.o umount.o uname.o uniq.o uptime.o wc.o which.o whoami. o xargs.o yes.o busybox.o usage.o applets.o libbb.a /usr/src/uClibc-0.9.26/lib/libc.a /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc.a(open.o): In function `__libc_open': __libc_open(.text+0x0): multiple definition of `__libc_open' /usr/src/uClibc-0.9.26/lib/libc.a(__syscall_open.o)(.text+0x0): first defined here /usr/bin/ld: Warning: size of symbol `__libc_open' changed from 61 to 33 in open .o /usr/lib/gcc-lib/i386-redhat-linux/2.96/../../../libc.a(close.o): In function `__libc_close': __libc_close(.text+0x0): multiple definition of `__libc_close' /usr/src/uClibc-0.9.26/lib/libc.a(__libc_close.o)(.text+0x0): first defined here /usr/bin/ld: Warning: size of symbol `__libc_close' changed from 45 to
27 in close.o . . and so on.If I try to build the classis printf("hello, world") it builds OK, but it doesn't seem to have used uClibc at all
$ gcc -Wall hello.c -L/usr/src/uClibc-0.9.26/lib/libc.a -o hello $ ldd hello libc.so.6 => /lib/libc.so.6 (0x40020000) /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
Where am I going wrong ?