From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from xry111.site (xry111.site [89.208.246.23]) by sourceware.org (Postfix) with ESMTPS id E4C9C3858D1E for ; Tue, 14 Feb 2023 13:02:27 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E4C9C3858D1E Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=xry111.site Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=xry111.site DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=xry111.site; s=default; t=1676379742; bh=Vtmm3C+Rekdpzhk+xo/T1Vi5UXAEHtwBMh3cVP5m7EY=; h=Subject:From:To:Cc:Date:In-Reply-To:References:From; b=PnYunTN94hF5wGh0wyf+LtyjAPJ4GK9chHgrOfkX/WptRxAmmjQ82yiRlGU7Tc6om ZVHnHR6UMsZLmhnZFHBN1tC/f1TKiopp8kqHi1bP03MuUVkZYB8/dVWUik7K284/Vj vgWsbR5ODXJ4ABOZ1NthXGgrAsbl2E1i38FESvvA= Received: from [IPv6:240e:456:1030:5cf6:bedf:6bc:7e29:f3e5] (unknown [IPv6:240e:456:1030:5cf6:bedf:6bc:7e29:f3e5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature ECDSA (P-384)) (Client did not present a certificate) (Authenticated sender: xry111@xry111.site) by xry111.site (Postfix) with ESMTPSA id 8F4F865AE6; Tue, 14 Feb 2023 08:02:20 -0500 (EST) Message-ID: <2c918a575894e49277e30d427c6df2380a9a098e.camel@xry111.site> Subject: Re: Cross Compiling for riscv64 From: Xi Ruoyao To: Sagar Acharya Cc: gcc-help@gcc.gnu.org Date: Tue, 14 Feb 2023 21:02:14 +0800 In-Reply-To: References: <8db704d6dae26764592f794835e07fc4100ed506.camel@xry111.site> <4db1fdb33d0f4006e0b083b4429949337a740c01.camel@xry111.site> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable User-Agent: Evolution 3.46.4 MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,LIKELY_SPAM_FROM,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 Tue, 2023-02-14 at 13:57 +0100, Sagar Acharya wrote: > Point of a compiler is to convert C code to machine code of > hex/binary/object file in least amount of time and conserving as much > memory as can be done. A compiler needs to take a balance between compiling speed & memory consumption and the speed & memory consumption of the generated code.=20 GCC prefers to make better generated code, as long as no quadratic behavior exists during compile time. > The values of memory required are definitely not of order 1GB. There > are OSes which can be booted in less than 100MB. You can find another compiler if you really need one for a small device. Or you can submit some patches to improve the speed & memory footprint of GCC (or hire somebody to do) as long as you don't hurt the generated code. "You think what it should be" is not "what it should be". --=20 Xi Ruoyao School of Aerospace Science and Technology, Xidian University