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 09:32:00 -0000	[thread overview]
Message-ID: <53D22418.10902@elis.ugent.be> (raw)
In-Reply-To: <4E066E4A-E484-49E4-A4E7-46DED6F934B3@adacore.com>

On 25/07/14 10:26, Tristan Gingold wrote:
>
>> PS: shall I file a bug report?
>
> Why not (but a patch would even be better)!

In the end it does seem to be at least a partial PEBKAC: gas assumes I'm 
trying to configure for AIX version "53" rather than "5.3" :) Although 
technically, that version is still larger than 4.3 and hence it should 
default to the newer object file format :)

All subdirectories that care about the AIX version use a different 
matching logic:
* ld/configure.tgt:

powerpc-*-aix[5-9]*)    targ_emul=aix5ppc ;;
powerpc-*-aix*)         targ_emul=aixppc ;;
rs6000-*-aix[5-9]*)     targ_emul=aix5rs6 ;;
rs6000-*-aix*)          targ_emul=aixrs6

* binutils/configure.tgt:

     powerpc-*-aix[5-9]* | rs6000-*-aix[5-9]*)
         targ_emul=aix
         targ_emul_vector=bin_aix_emulation
         ;;

     powerpc-*-aix4.3* | rs6000-*-aix4.3*)
         targ_emul=aix
         targ_emul_vector=bin_aix_emulation
         ;;

* gas/configure.tgt (after mapping "rs6000" and "powerpc" to "ppc"):

   ppc-*-aix5.[01])                      fmt=coff em=aix5 ;;
   ppc-*-aix[5-9].*)                     fmt=coff em=aix5 ;;
   ppc-*-aix*)                           fmt=coff ;;

This will all obviously also break for a hypothetical future AIX version 
10. Maybe the matching could be inverted by first explicitly checking 
for (powerpc|rs6000|ppc)-*-aix[1234].*, and afterwards let 
(powerpc|ppc)-*-aix* select AIX 5+ functionality? Optionally, 
(powerpc|rs6000|ppc)-*-aix without any version suffix could also map to 
the old object format, for backward compatibility -- except for 
binutils/configure.tgt, which already doesn't match plain *-aix at all 
(not sure what happens then, maybe no AIX support whatsoever in objdump 
and friends -- AIX is the only target that is handled specially there)


Jonas

PS: I don't have an active copyright assignment on file and it's quite a 
bureaucratic hassle to get one from my university (not because they're 
not willing to give it, but simply because of the process you have to go 
through, and they want give it for one year at a time only).

Well, technically I may have a copyright assignment on file, because the 
scan I got of the form they sent to the FSF last time (in 2009) didn't 
have the date filled out, so it may be valid indefinitely :)

OTOH, for changes like this no copyright assignment may be required, I 
don't know.

  parent reply	other threads:[~2014-07-25  9:32 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
2014-07-25  8:26     ` Tristan Gingold
2014-07-25  8:31       ` Tristan Gingold
2014-07-25  9:32       ` Jonas Maebe [this message]
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=53D22418.10902@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).