This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: AIX 4.3 and gcc-3.4.6 build


JÄdrzej Dudkiewicz wrote:
Hi,

I'm trying to build gcc-3.4.6 on AIX 4.3. I'm following the
system-specific instructions for AIX system (CONFIG_SHELL, patches,
etc.).
As a machine I build on is rather old, there is not enough space on
harddisk, so I'm doing everything on a remote mount (NFS).

What about cross-compiling, aka making a crosscompiler for AIX 4.3? Should it be possible? At least for someone who legally has the target stuff, C library binaries and headers... For anyone interested? The AIX target stuff being freely available via download?

I run configure from/jd/src/gcc-build/aix-build directory:
../gcc-3.4.6/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld
--disable-nls --enable-languages=c,c++ --prefix=/jd/aix-bin/gcc-3.4.6
--enable-threads --enable-shared --enable-static

Compilation fails after about seven hours(!)

I would expect the same happening in 15-30 minutes even on a 600-800 MHz PC with Linux and with 512 Mbytes RAM... Producing multilibs for libgcc can make things a little slower.

with the following:

configure:2484: checking whether the C compiler works
configure:2490: ./a.out
Could not load program ./a.out:
Cannot run a 64-bit program on a 32-bit machine.
configure:2493: $? = 255
configure:2502: error: cannot run C compiled programs.

It seems obvious that in such case attempt at building 64-bit version
should be avoided - but it isn't.

What is the best way to solve this?

As the row in the log tells :


"tooldir=/jd/aix-bin/gcc-3.4.6/powerpc-ibm-aix4.3.3.0"

the $target name was calculated as 'powerpc-ibm-aix4.3.3.0'. If this is
a 32-bit only system, a crosscompiler is the way for producing those 64-
bit apps. If it should be a 64-bit system which can also run 32-bit
apps, then something is badly wrong :(  The 'powerpc' however tells
about a 32-bit PPC system, a 64-bit system would be recognized as
'powerpc64-ibm-aix4.3.3.0'...

Ok, what I could try first is to edit the 'gcc/config/rs6000/t-aix43'
and remove the 'ppc64' multilib from the rows :

MULTILIB_OPTIONS = mcpu=common/mcpu=power/mcpu=powerpc/maix64

MULTILIB_DIRNAMES = common power powerpc ppc64

so that these will be like :

MULTILIB_OPTIONS = mcpu=common/mcpu=power/mcpu=powerpc

MULTILIB_DIRNAMES = common power powerpc

I really don't know what it should do or shouldn't do in an AIX system,
this fix only removes the production of the '-maix64' libraries...


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]