This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Problem building cross-compiler for AIX 6.1
- From: John M Collins <jmc at xisl dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Sat, 02 Jun 2012 19:34:43 +0100
- Subject: Re: Problem building cross-compiler for AIX 6.1
> With my experience, a few posts down.
>
> First pass of gcc in a cross compiler, you have to disable both
> threads and shared. Problem is that both depend on files that you only
> create when you compile your target C library, and you can only
> compile that when you've a basic compiler working.
>
> So first compile with --disable-shared --disable-threads
>
> Then do your C lib
>
> Then recompile with shared and threads enabled, and making sure you
> are pointing things to the new files created by the C lib ....
>
> Hope this helps,
>
> David.
Thanks I tried that and I seemed to have a working C compiler which
compiled a "hello world" program without complaint but then when I
copied it to the AIX 6.1 machine the binary wouldn't work - it
complained about a missing "shr.o" in libc.a.
I then tried compiling it with -static but the link phase failed with
/home/crossenv/lib/gcc/powerpc-ibm-aix6.1/4.7.0/../../../../powerpc-ibm-aix6.1/bin/ld:
internal error ../../binutils-2.22/ld/ldlang.c 6147
collect2: error: ld returned 1 exit status
Seems to be an assertion fail in "collect2".
I tried asking about that in the binutils mailing list but no one has
replied yet.
This thing seems to be fighting me all the way, I can't get GCC to build
native on AIX 6.1
--
John Collins