This is the mail archive of the
mailing list for the binutils project.
Re: Cross-assembling for AIX/PowerPC64
- From: Jonas Maebe <jonas dot maebe at elis dot ugent dot be>
- To: Tristan Gingold <gingold at adacore dot com>
- Cc: binutils at sourceware dot org
- Date: Fri, 25 Jul 2014 10:10:44 +0200
- Subject: Re: Cross-assembling for AIX/PowerPC64
- Authentication-results: sourceware.org; auth=none
- References: <53D205B3 dot 1060904 at elis dot ugent dot be> <B0FA3B47-9919-426C-8EC1-03E4D8F37C60 at adacore dot com>
On 25/07/14 09:36, Tristan Gingold wrote:
On 25 Jul 2014, at 09:22, Jonas Maebe <firstname.lastname@example.org> wrote:
I have configured binutils 2.24 using the following configure command (on OS X 10.9):
../configure --target=powerpc-ibm-aix53 --with-sysroot --disable-werror
The resulting assembler can assemble for AIX/PowerPC (32 bit) fine. However, when I try to assemble for AIX/PowerPC64 with this command:
powerpc-ibm-aix53-as -a64 -u -o ../../rtl/units/powerpc64-aix/ctypes.o ../../rtl/units/powerpc64-aix/ctypes.s -mpwr5
Then I get the following error:
Fatal error: selected target format 'aixcoff64-rs6000' unknown
There is a discrepancy between bfd and gas. Try to configure for powerpc-ibm-aix or hack gas/config/tc-ppc.c
I had to hack gas/config/tc-ppc.c (manually add a "#define TE_AIX5"; it
seems this should normally be set by gas/config/te-aix5.h, but this file
doesn't appear to be included anywhere), because configuring for
powerpc-ibm-aix resulted in linker errors:
powerpc-ibm-aix-ld -bpT:0x10000000 -bpD:0x20000000 -btextro
-binitfini:P.BUG_.._main:FPC_LIB_EXIT -G -L. -o shr_64.o link.res -b64
/Data/dev/aix/aixroot/lib/crt0_64.o: file not recognized: File format
not recognized (that's a crt0_64.o from an AIX 5.3 machine).
Configuring that way also meant that ar's -X64_32 option was not
supported (presumably such support was only added in AIX 5.x).
In any case, with the hack it does work. Thanks!
PS: shall I file a bug report?