public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jonas Maebe <jonas.maebe@elis.ugent.be>
To: Tristan Gingold <gingold@adacore.com>
Cc: binutils@sourceware.org
Subject: Re: Cross-assembling for AIX/PowerPC64
Date: Fri, 25 Jul 2014 08:10:00 -0000	[thread overview]
Message-ID: <53D21104.90504@elis.ugent.be> (raw)
In-Reply-To: <B0FA3B47-9919-426C-8EC1-03E4D8F37C60@adacore.com>

On 25/07/14 09:36, Tristan Gingold wrote:
>
> On 25 Jul 2014, at 09:22, Jonas Maebe <jonas.maebe@elis.ugent.be> wrote:
>
>> Hi,
>>
>> 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:
>>
>>   Assembler messages:
>>   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 
-bE:linksyms.fpc

  /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!


Jonas

PS: shall I file a bug report?

  reply	other threads:[~2014-07-25  8:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-25  7:22 Jonas Maebe
2014-07-25  7:36 ` Tristan Gingold
2014-07-25  8:10   ` Jonas Maebe [this message]
2014-07-25  8:26     ` Tristan Gingold
2014-07-25  8:31       ` Tristan Gingold
2014-07-25  9:32       ` Jonas Maebe
2014-07-25  9:36         ` Tristan Gingold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53D21104.90504@elis.ugent.be \
    --to=jonas.maebe@elis.ugent.be \
    --cc=binutils@sourceware.org \
    --cc=gingold@adacore.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).