From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by sourceware.org (Postfix) with ESMTPS id 8DF2C3858288 for ; Thu, 16 Jun 2022 07:46:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8DF2C3858288 Received: by mail-wr1-x429.google.com with SMTP id x17so714301wrg.6 for ; Thu, 16 Jun 2022 00:46:08 -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=2naXXYvoxW7xc/bqS2kR5tmzvu7xG83AVEMeBzO0Ook=; b=HIYqZziNWiJUtPa98OauWvBIJveiq7QHn979iN/jVFzHEBj7VCy2cr4dXpet1eyKbX C9pQTg80brTytS+A3X+OW83yjpTMapcy+ABK5TuguzpB1e6C9wg+WVNyB9f61QwkVoKv LII+lSCAqOjOrGMI3OaVR5zmObP62OY2FG1BxJN4MMxN653rYgy0vcsPaDBwAZG6X/b3 BMJgscRScEsad+5j/Ukt3qKhOm9SX+cx5AmZEXRnd0YroOamASeNb/BbRsqGSQOlzGmF xyHhQRLr+/3vX1cYISEKyiIz+HI/3iC7yx1jSldpmmhDtyVaXJDslP6QR6xBowjcZGk1 Ss3Q== X-Gm-Message-State: AJIora9owTZNsVDqiA+rKMNqreyJDswj4eG3rbaJrIEGY1t4TRr/y8T9 2lyy1tpq6Pst1bBqiioGAg3+YMEJQCeNVi3JhIs= X-Google-Smtp-Source: AGRyM1vk2sTGDpqYQxLqUXN/gPUPBP80K1asDhQzyWSon0hVrzhbSDHYtDvE8Qy3GdT71KgpSd26R54RRVLGYhTmKa0= X-Received: by 2002:a5d:5109:0:b0:218:40cc:a29b with SMTP id s9-20020a5d5109000000b0021840cca29bmr3546719wrt.601.1655365565151; Thu, 16 Jun 2022 00:46:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Christophe Lyon Date: Thu, 16 Jun 2022 09:45:54 +0200 Message-ID: Subject: Re: Anybody ever got an ARM Thumb-2 cross compiler to work? To: Gary Oblock Cc: Jonathan Wakely , Gary Oblock via Gcc-help X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_NONE, 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" 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: Thu, 16 Jun 2022 07:46:11 -0000 Hi Gary, Sorry, your request is not entirely clear to me either. IIUC what you want to achieve has been working for decades and is certainly not obsolete :-) If you don't need to build such a toolchain, you can download pre-built binary toolchains from Arm for instance: https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain#Technical-Specifications If you want to build a cross toolchain, it's not straightforward but very well supported. I think there are already plenty of documentation describing how to do that. The important thing is to get the right target triplet when configuring your toolchain, you want something like arm-eabi or arm-linux-gnueabi, as opposed to aarch64*. Once the build has completed, when using the compiler make sure to generate code for an architecture/cpu that actually supports Thumb-2 (via -march=XX/-mcpu=XXX), and use -mthumb, as it's generally not the default. Christophe On Thu, Jun 16, 2022 at 9:11 AM Gary Oblock via Gcc-help < gcc-help@gcc.gnu.org> wrote: > Jonathan > > By off the shelf, I mean not creating a new target description file. > Something > which I'm not at all experienced in (optimizations are my thing so I'm an > amateur at creating a cross-compiler.) > > I can't seem to figure out what the binutils or the gcc target is for > Thumb-2. > If you know, please let me know. I suspect that is an obsolete target > that no longer exists for the latest binutils and GCC 12. > > Thanks, > > Gary > > ________________________________ > From: Jonathan Wakely > Sent: Wednesday, June 15, 2022 11:31 PM > To: Gary Oblock > Cc: Gary Oblock via Gcc-help > Subject: Re: Anybody ever got an ARM Thumb-2 cross compiler to work? > > [EXTERNAL EMAIL NOTICE: This email originated from an external sender. > Please be mindful of safe email handling and proprietary information > protection practices.] > > > > On Thu, 16 Jun 2022, 00:18 Gary Oblock via Gcc-help, > wrote: > The subject line says it all... > > I'm beginning to think off the shelf gcc cross compilers are impossible > to create because of binutils. > > Why? > > What do you mean by "off the shelf"? > > At other companies we for the most part > created custom assemblers, loaders and libraries from scratch > when we built a gcc cross compiler. > > Why can't you just build a cross binutils too? >