From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from fgw22-4.mail.saunalahti.fi (fgw22-4.mail.saunalahti.fi [62.142.5.109]) by sourceware.org (Postfix) with ESMTPS id 9C7E53838656 for ; Wed, 15 Jun 2022 11:36:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9C7E53838656 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=wippies.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=wippies.com Received: from [10.0.0.26] (mobile-access-2e843d-172.dhcp.inet.fi [46.132.61.172]) by fgw22.mail.saunalahti.fi (Halon) with ESMTPSA id 6feac189-ec9f-11ec-ae1c-005056bdf889; Wed, 15 Jun 2022 14:36:47 +0300 (EEST) Message-ID: Date: Wed, 15 Jun 2022 14:36:46 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: Building Linux x86_64 to AIX PowerPC cross-compiler To: Paul Lucas , gcc-help@gcc.gnu.org References: <8109E6B6-F99A-473B-9E8B-A540FC7679CD@splunk.com> From: Kai Ruottu In-Reply-To: <8109E6B6-F99A-473B-9E8B-A540FC7679CD@splunk.com> X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00, HTML_MESSAGE, KAM_DMARC_STATUS, KAM_SHORT, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gcc-help@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-help mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2022 11:36:52 -0000 Paul Lucas via Gcc-help kirjoitti 14.6.2022 klo 19.18: > Hi there - > > I want to build a cross-compiler from Linux x86_64 (host) to AIX PowerPC (target). Eventually, while building gcc, I get: > >> collect2: fatal error: libgcc.a: cannot open as COFF file > > While Linux uses ELF and AIX uses coff, I would have assumed that the binutils I built for the cross-compiler would have produced a linker that was able to link COFF files. > > The configure for binutils was: > >> configure --disable-gold --prefix=/aix-powerpc --disable-multilib --disable-nls --target=powerpc-ibm-aix7.1.0.0 --with-sysroot=/aix-powerpc --with-arch=powerpc --disable-werror --enable-plugins > where /aix-powerpc contains headers and libraries copied from a live AIX system. The GNU Install documents for target platforms : https://gcc.gnu.org/install/specific.html#x-ibm-aix are saying : "The native |as| and |ld| are recommended for bootstrapping on AIX. The GNU Assembler, GNU Linker, and GNU Binutils version 2.20 is the minimum level that supports bootstrap on AIX 5. The GNU Assembler has not been updated to support AIX 6 or AIX 7. The native AIX tools do interoperate with GCC." So it seems that AIX 6 and AIX 7 aren't supported in GNU binutils :( The biggest problem in this issue probaly is that so few people can get the "headers and libraries copied from a live AIX system". Or IBM or something would provide them freely for everyone wanting to make crosscompilers for AIX. Those who have AIX systems just produce native GNU tools and are happy. Others aren't interested to work with cross tools they cannot make... For instance the Sun Solaris2 headers and libraries have beem freely available just like the whole Sparc/x86 operating systems. So anyone could have procuded crosstools for these platforms if having the required know-how for building GNU tools.