This is the mail archive of the
binutils@sourceware.org
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 11:32:08 +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> <53D21104 dot 90504 at elis dot ugent dot be> <4E066E4A-E484-49E4-A4E7-46DED6F934B3 at adacore dot 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.