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 8B66B3858D33 for ; Mon, 13 Feb 2023 08:48:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 8B66B3858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=kernel.crashing.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=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 31D8llIG006885; Mon, 13 Feb 2023 02:47:47 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 31D8lk97006882; Mon, 13 Feb 2023 02:47:46 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 13 Feb 2023 02:47:46 -0600 From: Segher Boessenkool To: Christer Solskogen Cc: gcc-help@gcc.gnu.org Subject: Re: Problem cross-compiling gcc Message-ID: <20230213084746.GD25951@gate.crashing.org> References: <20230213081617.GC25951@gate.crashing.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.3i X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Mon, Feb 13, 2023 at 09:35:56AM +0100, Christer Solskogen via Gcc-help wrote: > On 13.02.2023 09:16, Segher Boessenkool wrote: > >On Sun, Feb 12, 2023 at 06:51:06PM +0100, Christer Solskogen via Gcc-help > >wrote: > >>While cross compiling gcc with musl I see this: > > > >>This is the configure line: /home/solskogen/gcc/configure --prefix=/usr > >>--libexecdir=/lib --host=aarch64-centrix-linux-musl > >>--target=aarch64-centrix-linux-musl --build=x86_64-pc-linux-gnu > >>--enable-languages=c,c++ --disable-multilib --enable-checking=release > >>--disable-nls --with-gcc-major-version-only --enable-plugin > >>--disable-libstdcxx-pch --enable-default-pie --enable-default-ssp > >>--disable-libsanitizer --enable-host-shared > > > >That is not a cross-compiler, you are building a cross-built native > >compiler here (host=target). To do that you already need a working > >cross-compiler, so it is probably not what you intended to do. > > > > Oh, I know. That's why the subject is "cross-compiling gcc" :-) > I already have a working cross compiler. Aha :-) > In fact, cross compiling gcc is > pretty good way to check that the cross compiler is in good shape. I'd say it is mainly a good way to hit problems no one else does. For example many things won't be detected correctly by the autoxxxx macros It's not helped by the fact that musl isn't very mainstream either of course, but I guess you are trying to change that :-) gl;hf, Segher