From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11717 invoked by alias); 25 Jul 2014 08:10:51 -0000 Mailing-List: contact binutils-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sourceware.org Received: (qmail 11669 invoked by uid 89); 25 Jul 2014 08:10:48 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp2.ugent.be Received: from smtp2.ugent.be (HELO smtp2.ugent.be) (157.193.49.126) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Jul 2014 08:10:46 +0000 Received: from localhost (mcheck3.ugent.be [157.193.71.89]) by smtp2.ugent.be (Postfix) with ESMTP id 9B1BD12C606; Fri, 25 Jul 2014 10:10:44 +0200 (CEST) Received: from smtp2.ugent.be ([IPv6:::ffff:157.193.49.126]) by localhost (mcheck3.UGent.be [::ffff:157.193.43.11]) (amavisd-new, port 10024) with ESMTP id mBf67BcXHoup; Fri, 25 Jul 2014 10:10:43 +0200 (CEST) Received: from nocat.local (unknown [91.181.184.82]) (Authenticated sender: jmaebe) by smtp2.ugent.be (Postfix) with ESMTPSA id 4575712C5FC; Fri, 25 Jul 2014 10:10:44 +0200 (CEST) Message-ID: <53D21104.90504@elis.ugent.be> Date: Fri, 25 Jul 2014 08:10:00 -0000 From: Jonas Maebe User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 MIME-Version: 1.0 To: Tristan Gingold CC: binutils@sourceware.org Subject: Re: Cross-assembling for AIX/PowerPC64 References: <53D205B3.1060904@elis.ugent.be> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-j-chkmail-Enveloppe: 53D21104.002 from unknown/82.184-181-91.adsl-dyn.isp.belgacom.be/91.181.184.82/nocat.local/ X-j-chkmail-Score: MSGID : 53D21104.002 on smtp2.ugent.be : j-chkmail score : . : R=. U=. O=. B=0.000 -> S=0.000 X-j-chkmail-Status: Ham X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00192.txt.bz2 On 25/07/14 09:36, Tristan Gingold wrote: > > On 25 Jul 2014, at 09:22, Jonas Maebe 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?