From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by sourceware.org (Postfix) with ESMTPS id 996E838582AD for ; Fri, 16 Sep 2022 20:09:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 996E838582AD Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-ej1-x62e.google.com with SMTP id 13so22890910ejn.3 for ; Fri, 16 Sep 2022 13:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date; bh=Z42K71r28RdLMLow8f8ulUSzSGesZO9YVfoel45nB+c=; b=IAvEQr/vm7LEEoA6opefY7OtDrIN5aLZuZWs/RyqnIYk1iI8O2Ve7OMOnq/Hyx/54u GnofEAKIoNaathXBFTYeRO+aWPR5pMogw57Dv+iaQfWL0wjtHA4zm7/Co4bIeNW60ldA Re9ASH8Tuic6WsaC0pMRbhRVQBxtQHtM8EHYGhUVUqA1tqQBFiD/wVHk7y9BAOu/Ubin vHCzCFqIOvldtzdJ10P9qcAbk3UAkcBQVNA6qz6kc+u+KJ+7F5+0ffETbAXSB8BoLtbG jDTMRNgtJjPHC+pcxneYAifZBNbyc0VHO8+PeYVIXz1MjdvxBmiDzoe/NL/dCHTHFXxI XqaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date; bh=Z42K71r28RdLMLow8f8ulUSzSGesZO9YVfoel45nB+c=; b=cnhHuDPhkq5ZKiIiMjkmWrWdUvR/KZEv8qxiW9kac9s2hiKGJF2FWhTWXUd7XWkoEZ 1epQU93OnVS4gvIkjXogYXiGqKdyy0lbTs7bAMT0gYxN2rhkRP+127iZpF05lzzjuyBx 7ETSZoAxGhk1ufU4IWx0vFnVPuLJNqiDPR9XHJr7mjWxsNAVDTCG+qTIEPilUbMqvvS9 DjnYwSSQ913p9SHyi2XB7dUka/vMJrQwtpHuMDVISmCAtmQpSLyLEDOO8Hd8Is4SAmTs HNo7r9uOc/M2Dlvk08gWpatKOVwJrnbTHwS+VQAvpOsPr0rBnhGE4hTYShiiA18a6AKa S1Lg== X-Gm-Message-State: ACrzQf1namp7t66h4jPcKEeqQrx1re7DLdMnPbKXy6lOqsJBTuZYWTAv 5jWWJgaRuzmCVBKqTZ4Ib4N594ao0dmRHpNQruE= X-Google-Smtp-Source: AMsMyM6KDl6KE6PtVSPO6aIZgEUxHYTVKTHkWA0mTv497/y8fe6HOaB/QUgjTrbmBolBQZ/VD+It82UyBG5E95ilRjc= X-Received: by 2002:a17:907:160e:b0:780:3c1f:18f8 with SMTP id hb14-20020a170907160e00b007803c1f18f8mr4782802ejc.386.1663358971138; Fri, 16 Sep 2022 13:09:31 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Fri, 16 Sep 2022 21:09:20 +0100 Message-ID: Subject: Re: How to move gcc to compile to my own architecture? To: Jackson Pfeffer Cc: Chengyin Yao , gcc-help Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham 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 Fri, 16 Sept 2022 at 20:51, Jackson Pfeffer wro= te: > > I shouldn't assume (you know what happens)... But I assume they are askin= g how to compile GCC from source on a machine running (for example) some AR= M chip running Linux to get an executable GCC that will run on (for example= ) an Intel x64 chip running windows. > > I assume (there it is again) that they are compiling on one well known "a= rchitecture" targeting another well known (but different) "architecture". > > I'm a GCC noob, but I think this basically amounts to them needing a cros= s compiler. Indeed, I should have said that the fist link on the osdev wiki covers that case (which is much simpler than porting GCC to a brand new architecture). See https://wiki.osdev.org/GCC_Cross-Compiler for cross compiler details. That's all you need to be able to use one type of machine to compile code for a different type of machine.