From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by sourceware.org (Postfix) with ESMTPS id 51FE43857014 for ; Fri, 16 Sep 2022 16:28:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 51FE43857014 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-x636.google.com with SMTP id a26so21901356ejc.4 for ; Fri, 16 Sep 2022 09:28:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=7HTUTN+3tWmIS3wl2aNGfgLY2l6iquBEPHwEmIUCtKY=; b=AkhmlrafHintC13EzDrxArgBcc4lz1t7D8FIn9/3v8FQpKPHP2gzvklex7NBfE5iCh IFo+7LNcqqD9rDtHoo6G9V75tnPKErqq/5cmMUdKiw4f2Vz1H2W0EZE/Tuzh7zJTtDU1 ITwJk2yrZDnT2zMQIg2V61lcwN+Xl5Wj5ZDkRfENdCcvIA+IHionRvUm9pndmAM/L4yq CRyDDpeDx2vxyCUyO2jL50FJwZulIayZQeGMZVFcugeFanij6QQz3UYC0d8rWLYx1+L4 izTDVnqyjfva3x2pYDkKc3kJ7MG+aOLmEi75FxIb1GKcrxOYKs/F0EoMLXo5boaODRim A2TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=7HTUTN+3tWmIS3wl2aNGfgLY2l6iquBEPHwEmIUCtKY=; b=k7ToP0zUz0z4K2KugJckyEEN1lg7Z3360WVcFYY9Aa+0Y1k6hr3vZ0lbzELupwbSLk rv9duFvNV90j/6XpIRTsgAAxtWS1lIMTOUMYw9Gbzh1QBHWqoG/+xZzK65aymsbVSRr/ 3fb36iSHs131jt6iihTQscCnYwb5jFnec4e1XHrh66XnC1vaBKZtqBuXoiKIha1v8GkQ WlXrVHEu0kKJ1ug6ljXUXk/VYhZEl9xVKLpMB7pG/wR4azmDevKkCjvwNnVDmxKeP9ec to4gxoCL09aFgk5lbCAKNKjOIu45l4H40Dm/ZSRogAZE4Sw5xZaYfy+FbkPF2bM1Z+4I TBmg== X-Gm-Message-State: ACrzQf3nDtYjo3nsqt6dn17bL8BD4luM7yWtk2x21Tw+1Rc/kccoVxJ2 aRHYeCNcmdti748vI8MhQHhvSldyj73P1SzIQ/4= X-Google-Smtp-Source: AMsMyM5tTf6aImIXHxz5YizUG+b+pKoCY9pM7bFysh9bojE34wWLHa6rZ2Lc/NlWhfTArukFdc6UOYMS+mgkN2/kfAA= X-Received: by 2002:a17:907:a408:b0:780:3d91:9232 with SMTP id sg8-20020a170907a40800b007803d919232mr4096295ejc.506.1663345685397; Fri, 16 Sep 2022 09:28:05 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Fri, 16 Sep 2022 17:27:54 +0100 Message-ID: Subject: Re: How to move gcc to compile to my own architecture? To: Chengyin Yao Cc: "gcc-help@gcc.gnu.org" Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,KAM_SHORT,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 17:05, Chengyin Yao via Gcc-help wrote: > > Yea so I'm just wondering, how to compile gcc to (my own) architecture cpu that has a completely different architecture? I'm not sure what you mean by "move gcc", and what is this "completely different architecture"? The best answers depend on what you mean. Have you created your own CPU with its own instruction set? Then you want to "port" GCC (and binutils for the assembler and linker) to your architecture. That's quite a lot of work. You could start by reading https://gcc.gnu.org/onlinedocs/gccint/Back-End.html and https://wiki.osdev.org/Porting_GCC_to_your_OS