From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa.splunk.iphmx.com (esa.splunk.iphmx.com [216.71.153.223]) by sourceware.org (Postfix) with ESMTPS id 27B5B385E012 for ; Tue, 14 Jun 2022 16:27:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 27B5B385E012 X-IronPort-AV: E=Sophos;i="5.91,300,1647302400"; d="scan'208";a="198750061" Received: from mail-vk1-f197.google.com ([209.85.221.197]) by ob1.splunk.iphmx.com with ESMTP/TLS/ECDHE-RSA-AES128-GCM-SHA256; 14 Jun 2022 16:27:01 +0000 Received: by mail-vk1-f197.google.com with SMTP id d189-20020a1f9bc6000000b00368818975efso844031vke.6 for ; Tue, 14 Jun 2022 09:27:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=oF87itoYb0EmTH3Mj+uzHVvQu0b9/PUk3tG4ZvanSsA=; b=kYVAR8QCNqZU4n7Zu+fVSZzz2BsgsZZRXm5WwHt1WS0VJEg4x6A5jcTIIEEJyFaMiY AEB1grXhoCUnP8nXsbgpDLUVYNyOm6gGy4J3DLyi+XkGYRHBmxLr4Ut+076WPauxiHEo zeiKtJ2zbb8nwRNoHt66P/6H/7q4IoRzf8id9B6L/hoZfV/FO0mS6Qx9E/vowXv1VAM7 uGoyzUKXxiqavdlpzkHAex3tUAEsJYzPnCMrmClIXz3iio57YIKt7DOighNG+4+9FuKy BqvoutheANATEtpYWV6qr0NKrDDABZ8QjvM/KMxwCli/YaR0ZFvheq3yw4YY5qLWnqEp M+Gw== X-Gm-Message-State: AJIora9pnaNCnhSBej8OHALFd10l+TLhye5Cc8+MLF9QTBvBZ+TgAUgR aIonFrdxF1QKq5eqL83YoGz8tzj6lPKwvvuZblHtgrZzo6FrSy9lsPsMmZI9DR894zBIk7rt27L Uh+XlEuiGuTOyR7BHK9RA0l4URw4qmWEGwIPzo+TVTswUpoAnyNz5mBGGzHvELi0In1nacWJg82 U= X-Received: by 2002:a05:6214:d84:b0:46b:c94a:735f with SMTP id e4-20020a0562140d8400b0046bc94a735fmr4174240qve.18.1655223543134; Tue, 14 Jun 2022 09:19:03 -0700 (PDT) X-Google-Smtp-Source: AGRyM1styNIJkj+Zjsnas8lvMGD/FsiwfxkT1UgSdwgsaJ76L9mupiME12RgW0YSr7In1Rla+luzwg== X-Received: by 2002:a05:6214:d84:b0:46b:c94a:735f with SMTP id e4-20020a0562140d8400b0046bc94a735fmr4174199qve.18.1655223542600; Tue, 14 Jun 2022 09:19:02 -0700 (PDT) Received: from smtpclient.apple ([165.225.243.31]) by smtp.gmail.com with ESMTPSA id i1-20020a05620a27c100b006a691904891sm8990122qkp.16.2022.06.14.09.19.01 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 14 Jun 2022 09:19:02 -0700 (PDT) From: Paul Lucas Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: Building Linux x86_64 to AIX PowerPC cross-compiler Message-Id: <8109E6B6-F99A-473B-9E8B-A540FC7679CD@splunk.com> Date: Tue, 14 Jun 2022 09:18:59 -0700 To: gcc-help@gcc.gnu.org X-Mailer: Apple Mail (2.3696.100.31) X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, SPF_HELO_PASS, SPF_NONE, 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 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: Tue, 14 Jun 2022 16:27:09 -0000 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=3D/aix-powerpc --disable-multilib = --disable-nls --target=3Dpowerpc-ibm-aix7.1.0.0 = --with-sysroot=3D/aix-powerpc --with-arch=3Dpowerpc --disable-werror = --enable-plugins where /aix-powerpc contains headers and libraries copied from a live AIX = system. Apparently back in 2016 on this same mailing list: https://gcc.gnu.org/legacy-ml/gcc-help/2016-10/msg00108.html somebody was trying to build the same cross-compiler and got the same = error. Unfortunately, there=E2=80=99s no answer there. The only advice = given was: > Judicious use of "-v" can help spot calling the wrong linker, linking = the wrong libraries, wrong header file include paths, etc. Can anyone perhaps give a _little_ more help? Thanks. - Paul