From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x731.google.com (mail-qk1-x731.google.com [IPv6:2607:f8b0:4864:20::731]) by sourceware.org (Postfix) with ESMTPS id 55B3C3857412 for ; Fri, 16 Sep 2022 19:51:04 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 55B3C3857412 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-qk1-x731.google.com with SMTP id g2so13733369qkk.1 for ; Fri, 16 Sep 2022 12:51:04 -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=vcO5/WbagXqiGKatxceVRZAqd+kfbZfUMQ5tsT9S54A=; b=HBKSAAX1QeddXXZW5NggUKbYK3fJ8Jydl68koUsQ1kmIcVn1cvVh/HJ5Gq57utmhAL GmNojf9Kx9Q+lMhPF4kMpxgUzOgDG5Q0iTMVY+xYJ6TvhNzeu/XylcaWO5xxXHF7j2tA XQUeuSRsA/KO4WpL/EsZI85dz8rJ+GT8O8S4o5sLmrkD+QzzNfXTToki3/I8Rog22lgk 4jEJts5D7JZlGKRl3MfI5Gjja/DgoFNTF2jrJQl0oaTJ6/nuSMrQh0dc6Tf5jG9sd3AX fcq/CdXjggwrWbOKC+CejE6QDFGQpYo6+3701RYzF0BHaNzwkiwz+xv6FKHleQfBSSH/ 8Puw== 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=vcO5/WbagXqiGKatxceVRZAqd+kfbZfUMQ5tsT9S54A=; b=Cp5QWWinBVvLqvCa6caaul2vAvS14OonkGSbErFH5P4cfaHO2wxvdCFIRGfin83/oL euGu0B0Wf3Mnar+XarsdICVe7Lx4jj/d8uRjjUi57VTM3j/ygKyKvXxFBUj5PB/Vr/sS 7BjrBjL7uIGIPiMDZ8Z/EzNwP75S2pE//bEFSANF2eCY8SQX53SC5sBUpjde1C2/2GDr E17NV+iHL3Sqy+sNjWSmXKbe8XjIHArDSOXeMl3FZC5ShUnYXJhWYelEslmQN+DdFq88 RnROasWXP/1NOnEOn92WeQ9GsYP16W4B5ebp/9MykmypMO2Vf8BiYqcTyFcr8NB97Qev jrAQ== X-Gm-Message-State: ACrzQf1/z/KtJZ4gr4Nc4rvvjepHeV3m5daOFuF+zy0kAQ6zErrn6i1b LJaOx2/O4kw/FMhOZFbgt+9KkKZKzycgGI/RG9s= X-Google-Smtp-Source: AMsMyM52HrdZHNc3lqJ6VOEuo/z0IwXLFGa+VpiHVs3MvJGxcJk4NU5elmsfanBQyY06eUCNPrOjSdgNVyYDZ3gtKog= X-Received: by 2002:a37:68ce:0:b0:6cb:cac1:c9b3 with SMTP id d197-20020a3768ce000000b006cbcac1c9b3mr5342896qkc.528.1663357863551; Fri, 16 Sep 2022 12:51:03 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jackson Pfeffer Date: Fri, 16 Sep 2022 14:50:54 -0500 Message-ID: Subject: Re: How to move gcc to compile to my own architecture? To: Jonathan Wakely Cc: Chengyin Yao , gcc-help Content-Type: multipart/alternative; boundary="00000000000097680305e8d0aed4" X-Spam-Status: No, score=-0.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,HTML_MESSAGE,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: --00000000000097680305e8d0aed4 Content-Type: text/plain; charset="UTF-8" I shouldn't assume (you know what happens)... But I assume they are asking how to compile GCC from source on a machine running (for example) some ARM 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 "architecture" targeting another well known (but different) "architecture". I'm a GCC noob, but I think this basically amounts to them needing a cross compiler. Beyond that... Is probably a question for Jonathan the great. Jackson Pfeffer On Fri, Sep 16, 2022, 11:28 Jonathan Wakely via Gcc-help < gcc-help@gcc.gnu.org> wrote: > 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 > --00000000000097680305e8d0aed4--