[uClibc]Microblaze uClibc
John Williams
jwilliams at itee.uq.edu.au
Mon Mar 31 02:16:58 UTC 2003
Hi Erik,
Thanks for your reply. Comments and more questions in-line below.
Erik Andersen wrote:
> Easy enough to do. Step one is to create a new
> uClibc/libc/sysdeps/linux/microblaze directory and populate it
> per the content of the other supported arches (arm, x86, v850,
> etc), adjusted as necessary for the specifics of your Xilinx
> Microblaze architecture.
Done.
>> By doing the above, make gets part way into uClibc but fails
primarily because libgen.h is not in my gcc include path (oh, I'm
working under Cygwin BTW). I could hack the Makefile but I don't think
this is the right way to go.
>
>
>
> Hmm. What _is_ in the path specified on the gcc command line?
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?
> It is supposed to pull in the uClibc/include directory when
> compiling, but I've honestly never tried to make uClibc compile
> under Cygwin so I can't say what problems that may or may not be
> adding.
Do you know of any existing efforts building cross-platform uClibc under
Cygwin? (yeah, pretty specific I know
>> Am I going about this the right way, or do I have to go "higher"
than this and use buildroot etc? I searched the archive to see if Miles
>
>
> nope. That is for building thing using uClibc, which isn't going
> to be relevant till you have a basic port of uClibc compiling....
OK got it.
> The good news is (except for the cygwin specfic issues you may
> have) porting uClibc is pretty easy,
Glad to hear that! The low-level stuff that I copied out of v850 and
into microblaze only took about half an hour to port.
> especially since you will
> not need to port the shared lib loader for a mmu-less cpu,
This confuses me, I see messages on the uClinux list saying that uClinux
does support shared libraries??? Anyway not too worried about that yet,
bigger fish to fry (well, more urgent fish anyway
Thanks,
John
More information about the uClibc
mailing list