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 87D7C3858D33 for ; Mon, 13 Feb 2023 08:17:18 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 87D7C3858D33 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 31D8GHDU005489; Mon, 13 Feb 2023 02:16:17 -0600 Received: (from segher@localhost) by gate.crashing.org (8.14.1/8.14.1/Submit) id 31D8GH4V005488; Mon, 13 Feb 2023 02:16:17 -0600 X-Authentication-Warning: gate.crashing.org: segher set sender to segher@kernel.crashing.org using -f Date: Mon, 13 Feb 2023 02:16:17 -0600 From: Segher Boessenkool To: Christer Solskogen Cc: gcc-help@gcc.gnu.org Subject: Re: Problem cross-compiling gcc Message-ID: <20230213081617.GC25951@gate.crashing.org> References: 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 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. To build a cross-compiler you should not normally give any --build= or --host=, and instead use what is auto-detected for that. You'll end up with build=host: a cross-compiler. Segher