ARM cross-compiler with OpenMP support under Cygwin

Sebastian sebastian0322@googlemail.com
Tue Sep 16 09:42:00 GMT 2008


Thanks a lot for your quick reply, Brian!

To be honest, I'm not an expert in building a compiler, but your
answer gives me a good understanding of the problem here. So, to be
more precise: I need an ARM cross-compiler that supports OpenMP to run
applications (with OpenMP pragmas) on top of an ARM MPCore processor.
If I got you right, I have to include something more than only the
newlib that gives the compiler the thread support? Do you have some
more information in this direction?

Thanks for your patience!
Sebastian

2008/9/16 Brian Dessent <brian@dessent.net>:
> Sebastian wrote:
>
>> ../gcc-4.2.4/configure --target=arm-elf --prefix=/usr/cross/
>> --with-gnu-as --with-gnu-ld --with-newlib
>> --with-headers=/usr/cross/arm-elf/include --enable-libgomp
>
> OpenMP is a property of the target, not the host.  This means the target
> needs a pthreads API in order to support generating OpenMP code.
> arm-elf is a bare metal target (no operating system) and with just
> newlib you won't have any threading support, so this can't possibly
> work.  Note that this has nothing to do with the capabilities or thread
> model of the host -- that is exactly what is valuable about a cross
> compiler.
>
> --enable-threads=win32 is nonsensical for a *-elf target, because bare
> metal has nothing to do with Windows.  Again, this is specifying the
> thread model of the target, not the host.  And when you try to specify a
> posix thread model of the target, you get errors because newlib alone on
> a bare metal system doesn't support threads and the pthreads functions
> don't exist.
>
> You need to be more clear about what you hope to achieve here.  If you
> aren't actually targeting an ARM bare metal system then you need to
> specify the appropriate target, in conjunction with providing a sysroot
> of that target containing the appropriate headers and libraries.
>
> Brian
>



More information about the Gcc-help mailing list