[uClibc] Cross compiling question
J.C. Wren
jcwren at jcwren.com
Thu Nov 13 19:31:16 UTC 2003
I'm having trouble building a toolchain with the toolchain set. I'm
running on Redhat 7.3 with gcc 2.96 and a 2.4.20 kernel. I have the
BlueCat embedded system toolchain installed, which uses gcc 2.91 (yea,
yea, it's older than dirt, but it what we use). The kernel we use for the
target device is 2.2.12 for i386.
I want to build ulibc, so I can switch my application to linking against
it, and switch over to using busybox, with shared ulibc libs. It seems to
me that it shouldn't matter if I build the toolchain under RH or BlueCat.
However, in attempting to build it under RH, it explodes after building
gcc final. It tells me in the next config script that it runs (I'm not
sure what it's trying to build, libiberty I think) that gcc won't run.
And indeed, a manual invocation says
"/home/BlueCat/BETA/programs/slimedr/ulibc/toolchain_i386/lib/gcc-lib/i386-linux/3.3.1/../../../../i386-linux/lib/libc.so:
undefined reference to `__syscall_fcntl'"
I've also tried building in under BlueCat, but gcc 2.91 gets mad about an
assembly expression. Unfortunately, I didn't have screen running at the
time, and failed to log it.
Now, perhaps this was the wrong thing to do, but I figured since I'm
building for a 2.2.12 kernel, I need to replace the references in the
toolchain Makefile to 2.4.21 to 2.2.12. So I went to ye olde
/home/BlueCat/usr/src/linux directory, and built a
kernel-headers-2.2.12.tar.bz2 file, and placed that in the
ulibc/sources/dl directory, and adjusted the Makefile accordingly.
Or am I confused, and I need to use the 2.4.21 header files, since the
ulibc specific gcc is going to be running on a system with a 2.4.20
kernel? If that's the case, how does ulibc know about the 2.2.12 kernel?
The target system is a 386 with 8MB RAM, 2MB FLASH, and a 32MB CF card.
It does not need to run the compiler. I build a new CF card for testing,
with the application, libraries, and shell environment (currently bash
with discreet utilities, linked against libc. But I want to switch to
busybox, and shared libs using ulibc).
--jc
More information about the uClibc
mailing list