Cross compiling for m68k-uclinux, followup of 'Re: Link tests after GCC_NO_EXECUTABLES'

Elden Crom eldencw@gmail.com
Mon Feb 1 20:31:00 GMT 2010


On Sun, Jan 31, 2010 at 10:47 AM, Kai Ruottu <kai.ruottu@wippies.com> wrote:
> Elden Crom wrote:
>>
>> On an 'Linux eldenlinux2 2.6.31-17-generic i686 GNU/Linux' with 'gcc
>> version 4.4.1' I tried several variants of:
>>
>> ./gcc-4.4.3/configure --target=m68k-uclinux --enable-multilib
>> --enable-threads \
>>    --disable-libmudflap --disable-libssp --disable-libgomp \
>>    --enable-languages=c,c++ \
>>    --disable-nls            \
>>    --disable-lto
>> (Not that I understand all of the options.) I get:
>> Configuring in m68k-uclinux/libstdc++-v3
>> ..
>> checking for shl_load... configure: error: Link tests are not allowed
>> after GCC_NO_EXECUTABLES.
>> make[1]: *** [configure-target-libstdc++-v3] Error 1
>> ..
>>
>
> The prerequisites for producing GCC from sources should be quite well-known
> :
>
> 1. the target binutils (a native system has these usually, for a cross-host
> they must be built and
>   installed)

I have built and installed the binutils for m68k-uclinux.
If I only
 --enable-languages=c
and install gcc
Then gcc works fine for C files.
It's only broken if I enable c++.
Furthermore, if I
sed configure  -i.bck -e "s/noconfigdirs=\"\"/noconfigdirs=\"\"
#EWC\nnoconfigdirs=\"target-libstdc++-v3\" #EWC/"
(ie remove the listdc++ from being compiled) then g++ will compile and
install as well.
And make valid executables when linking to differently made (read
'old') crt1.o, crt1, etc and libstdc++.


>
> 2. the target C library (a native system has this usually, for a cross-host
> it must be installed)

Looking at the config script, it appears to have already decided that
It cannot even compile C++ tests, even though it just compiled the g++
compiler.
Is this the "--with-system......" option?


>
> When configuring libstdc++ the target C library will be investigated via
> link tests.  If one
> cannot even compile and link a "Hello World" with the just made new GCC,
>  ie. there is
> no headers and libraries for the target or something is wrong in them, then
> libstdc++ cannot
> be configured and built....
>
> Probably somewhere there is a pre-made 'uClibc' for 'uCLinux/m68k'.  If so,
> then download
> and install it where it belongs!   If not, you must build it from its
> sources and install it before
> you can continue.
>
> Installing (only) GCC happens via the (should be) well-known :
>
>   make install-gcc
>
> With gcc-4.4.3 you probably must install 'libgcc' separately :
>
>  make install-target-libgcc
>

'make install' will do both, right?

> After doing this you can try a "Hello World" for 'm68k-uclinux'  and see
> what is wrong...
>
>



More information about the Gcc-help mailing list