From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ed1-x531.google.com (mail-ed1-x531.google.com [IPv6:2a00:1450:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 5F4B93856DCA for ; Wed, 13 Jul 2022 19:47:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5F4B93856DCA Received: by mail-ed1-x531.google.com with SMTP id m16so15427599edb.11 for ; Wed, 13 Jul 2022 12:47:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=zjazG5fxdaju/HisEJiUWjGPHz0rRy4z+D8HjaHJS8Y=; b=H4+x+on1F+cnZmJDmnwOXXgGBreEWv0Yke1/viP9G2TSuQSj+rLthFHF9qrs2hLwhk G8S+gaANNVQMwGWbVVZTEZ3vX85yr7husqbxGX2rTA3/Sl4VLTDUO4RZCpw/Byk84uIx GkzH0iwCH37ogqWX1LpD+kDnn9FNrzAofBmiBGUQeMdkXN3+wWJeQ8+E0OoXVEzP1cHJ oeq2+h617SZ+d8TC0CSWKw+wKC+oCnsUiRnBWRkrJLWcYS3PnS5CFXjZyhrfB6P7dWZr 46imMBYJjwj/nLTxlGnnRPPHRHDy26TR5Tp0ujyRCR6X4aDVRIilG0X1EmJwAPAG/CCb rtmw== X-Gm-Message-State: AJIora9nIFdGvU5suq32JxmwMDNBFnwWVFGg/KI5Ac1qZpdo0LlMhYzi 15g3J/FN02fZFsKvYbGvKw1SHzgnGJHMcxVI0N4= X-Google-Smtp-Source: AGRyM1sw2X2U9LDpYFHXUuw/BjwPB8TvBJNlHtMykjJZ9cK07jhDvvIrBed/ncxyWzFAC6cQ4Kwj3Y6n8e4zBgE8m4c= X-Received: by 2002:a05:6402:254c:b0:43a:9e77:3b29 with SMTP id l12-20020a056402254c00b0043a9e773b29mr7006962edb.356.1657741651011; Wed, 13 Jul 2022 12:47:31 -0700 (PDT) MIME-Version: 1.0 References: <6A2F680E-2A62-46AA-8320-B799E1B49357@gmail.com> In-Reply-To: <6A2F680E-2A62-46AA-8320-B799E1B49357@gmail.com> From: Jonathan Wakely Date: Wed, 13 Jul 2022 20:47:17 +0100 Message-ID: Subject: Re: Compiling gcc-3.4.6 on sparc Solaris 9 To: Daniel Santos Cc: gcc-help , Rainer Orth X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, KAM_NUMSUBJECT, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, 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 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, 13 Jul 2022 19:47:34 -0000 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 > directory and running configure from there. > One thing I don=E2=80=99t understand is why the base configure script doe= s 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/configure =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 > package 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 GNU 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 linker. Either adjust your PATH so the GNU one is found first, or stop telling GCC it's GNU ld when it isn't.