[uClibc]Microblaze uClibc
John Williams
jwilliams at itee.uq.edu.au
Mon Mar 31 03:03:49 UTC 2003
I wrote:
> In uClibc/extra/gcc-uClibc, make fails building microblaze-uclibc-gcc:
>
> gcc-uClibc: gcc-uClibc.h gcc-uClibc.c
> gcc -Wall -O2 -Wl,-s gcc-uClibc.c -o $(TARGET_ARCH)-uclibc-gcc
>
> gcc-uClibc.h file is created and looks OK, but there is no (non-default)
> include path set. If I add -I$(TOPDIR)/include, then it will compile,
> but I get the following link errors from the host gcc
>
> /tmp/ccby8sT0.o(.text+0x33):gcc-uClibc.c: undefined reference to `_stderr'
> /tmp/ccby8sT0.o(.text+0x531):gcc-uClibc.c: undefined reference to
> `___xpg_basename'
> /tmp/ccby8sT0.o(.text+0x1673):gcc-uClibc.c: undefined reference to
> `_stdout'
> collect2: ld returned 1 exit status
>
> It's very odd - my host gcc toolchain works fine, and will happily
> compile and link, e.g., the linux menuconfig stuff. A "hello world"
> application doing fprintf(stderr,"dsdfsdf") compiles, links and runs
> just fine.
>
> Is there anything tricky happening in the uClibc/include/libgen.h (and
> features.h) that could be breaking my host gcc?
>
I think I've got this figured out - it's looking for the _host_
libgen.h, which for some reason is not provided under Cygwin. I googled
and found a simple workaround that goes into gcc-uClibc.c, this has me
up and running again. Erik this might be a useful little patch to
uClibc to get things going on Cygwin cross-platform setups. I'll let
you know when I clean it up properly.
I think the reason I got bizarro errors when I tried to include
/uClibc/include/libgen.h is that it's for the _target_, not host, gcc.
John
More information about the uClibc
mailing list