From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.CeBiTec.Uni-Bielefeld.DE (smtp.CeBiTec.Uni-Bielefeld.DE [129.70.160.84]) by sourceware.org (Postfix) with ESMTPS id 5B165385740C for ; Thu, 14 Jul 2022 08:18:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5B165385740C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=CeBiTec.Uni-Bielefeld.DE Authentication-Results: sourceware.org; spf=none smtp.mailfrom=CeBiTec.Uni-Bielefeld.DE Received: from localhost (localhost [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id EF817AE7A6; Thu, 14 Jul 2022 10:18:31 +0200 (CEST) X-Virus-Scanned: amavisd-new at CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (smtp.cebitec.uni-bielefeld.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9EDc9KzvJJra; Thu, 14 Jul 2022 10:18:31 +0200 (CEST) Received: from itzacchiuatl.CeBiTec.Uni-Bielefeld.DE (itzacchiuatl.CeBiTec.Uni-Bielefeld.DE [129.70.161.157]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 72BB0AE4C4; Thu, 14 Jul 2022 10:18:31 +0200 (CEST) Received: (from ro@localhost) by itzacchiuatl.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id 26E8IVsr007335; Thu, 14 Jul 2022 10:18:31 +0200 (CEST) X-Authentication-Warning: itzacchiuatl.CeBiTec.Uni-Bielefeld.DE: ro set sender to ro@CeBiTec.Uni-Bielefeld.DE using -f From: Rainer Orth To: Jonathan Wakely Cc: Daniel Santos , gcc-help Subject: Re: Compiling gcc-3.4.6 on sparc Solaris 9 References: <6A2F680E-2A62-46AA-8320-B799E1B49357@gmail.com> Date: Thu, 14 Jul 2022 10:18:30 +0200 In-Reply-To: (Jonathan Wakely's message of "Wed, 13 Jul 2022 20:47:17 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-3941.1 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, KAM_NUMSUBJECT, KAM_SHORT, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no 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: Thu, 14 Jul 2022 08:18:36 -0000 Jonathan Wakely writes: > On Wed, 13 Jul 2022, 19:55 Daniel Santos via Gcc-help, > wrote: > > Hello community, > > I am trying to build gcc on Sparc Solaris 9. > So far I am creating a directory sibling to the source distribution dire= ctory and > running configure from there. > One thing I don=E2=80=99t understand is why the base configure script do= es not descend > automatically to the gcc subfolder. > I have to go in there and run configure again. > > Which shell are you using? > > See https://gcc.gnu.org/install/specific.html#x-x-solaris2 where it says = to use ksh. > > While running configure with the command line : ../../gcc-3.4.6/gcc/conf= igure > =E2=80=94with-gnu-as =E2=80=94with-gnu-ld > and then make : it builds the files and when it gets to running ld I get= the error : > > /usr/local/sparc-sun-solaris2.9/bin/ld: target elf64-sparc not found > > I am building this gcc with the same version installed via sunfkeeware > packages. > > The reason for building it is that I need objective-c support and the pa= ckage > does not have it. > > This ld error indicates that the ld executable being run is from solaris= , and not > the gnu one I have in /usr/local/bin/ld > > Can anyone shed some light on this ? > > The installation instructions do say to use the native linker, not the GN= U binutils > one. > Again, see https://gcc.gnu.org/install/specific.html#x-x-solaris2 > > Passing --with-gnu-ld is wrong if it's finding and using the Solaris link= er. Either > adjust your PATH so the GNU one is found first, or stop telling GCC it's = GNU ld when > it isn't. Besides, because GCC on Solaris supports two incompatible versions of ld (Solaris ld and GNU ld), it is crucial to specify the path to the linker you want to configure with with --with-ld=3D (both for /usr/ccs/bin/ld and some version of GNU ld). Otherwise, PATH changes would randomly break the resulting gcc. If you really want to use GNU ld (I don't know why you would, though), please build and use a recent one: at least what's recommended in install.texi. You'd probably be able to use GNU ld from current binutils 2.38, too. On top of that, I wouldn't bother with GCC 3.4 at all. Instead, please use the latest release still supporting Solaris 9, GCC 4.9.4 It's way better tested and supported than the ancient GCC 3.4. Please consult the Solaris sections of the bundled install docs in gcc/doc/install.texi. It contains many hints and caveats to consider when building GCC. The online version on gcc.gnu.org is for GCC trunk only: everything pertaining to Solaris versions no longer supported (i.e. before Solaris 11.3) has been removed. Rainer --=20 ---------------------------------------------------------------------------= -- Rainer Orth, Center for Biotechnology, Bielefeld University