From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) by sourceware.org (Postfix) with ESMTP id 055F23857C69 for ; Thu, 21 Jan 2021 00:43:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 055F23857C69 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=fail smtp.mailfrom=segher@kernel.crashing.org Received: from gate.crashing.org (localhost.localdomain [127.0.0.1]) by gate.crashing.org (8.14.1/8.14.1) with ESMTP id 10L0gMKG007075; Wed, 20 Jan 2021 18:42:22 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 10L0gLZC007074; Wed, 20 Jan 2021 18:42:21 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Wed, 20 Jan 2021 18:42:20 -0600 From: Segher Boessenkool To: John Scott Cc: gcc-help@gcc.gnu.org Subject: Re: Target triplet: sh-elf vs sh1-elf vs sh2-elf Message-ID: <20210121004220.GH30983@gate.crashing.org> References: <20947043.EfDdHjke4D@t450> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20947043.EfDdHjke4D@t450> User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-7.2 required=5.0 tests=BAYES_00, JMQ_SPF_NEUTRAL, KAM_DMARC_STATUS, TXREP, T_SPF_HELO_PERMERROR, T_SPF_PERMERROR autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 21 Jan 2021 00:43:24 -0000 On Wed, Jan 20, 2021 at 03:49:28PM -0500, John Scott via Gcc-help wrote: > Hi, > > I'm interested in building the cross toolchain needed to build carl9170 > wireless firmware. The docs say that it needs an SH-2 toolchain, but the build > scripts only use the 'sh-elf' tuple. (I've asked about this on the linux- > wireless list but haven't garnered a response.) > > It seems like config.sub is equally happy to accept sh-elf and sh[1234]-elf, so > I wonder if the first is an alias and to what, or how Binutils+GCC interprets > the difference. sh2-elf defaults to -m2, while sh-elf defaults to -m1. This is only a default, with either toolchain you can generate code for both targets. (It could be that some other things or defaulted differently by the target files, or even disabled,or hardcoded -- I only looked in config.gcc). Segher