public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: David Brown <david@westcontrol.com>
To: Sagar Acharya <sagaracharya@tutanota.com>,
	Gcc Help <gcc-help@gcc.gnu.org>
Subject: Re: Cross compiler riscv64 building
Date: Wed, 8 Feb 2023 13:45:10 +0100	[thread overview]
Message-ID: <4dc4cba6-fad2-10df-4c00-f31346feb3f4@westcontrol.com> (raw)
In-Reply-To: <NNkiC8b--3-9@tutanota.com>

On 08/02/2023 12:11, Sagar Acharya via Gcc-help wrote:
> How do I configure and build a cross compiler for target riscv64 of latest gcc on aarch64 musl based void linux.
> 
> I have it's default gcc installed which I want to use for compiling.
> Thanking you
> Sagar Acharya
> https://designman.org
> 

For many people, a better option is to use pre-built binaries.  Getting 
a complete toolchain for cross-development is a fair bit of work, and 
can involve a lot of trial and error and research.  The compiler, gcc, 
is just one part of the job (albeit a big part) - you have binutils, 
libraries, debuggers, and perhaps other bits and pieces.  It can be an 
educational and - if you like that sort of thing - enjoyable task.  But 
it can also be frustrating and time-consuming.  And if your ARM host 
here is a small system (say, a Raspberry Pi rather than an Ampere Altra 
monster), toolchain builds can take a /long/ time.

I have no experience with RISC-V as yet (one day, I hope to use them), 
but it looks like you might get what you need from here : 
<https://xpack.github.io/dev-tools/riscv-none-elf-gcc/>.

(I work mostly with ARM microcontrollers and use ARM's "GNU ARM 
Embedded" toolchains, rather than xPack's.)

I've done more than my fair share of cross-gcc toolchain builds over the 
decades, but for most purposes, ready-built packages make life a lot easier.


      parent reply	other threads:[~2023-02-08 12:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-08 11:11 Sagar Acharya
2023-02-08 11:18 ` Jonathan Wakely
2023-02-09 11:20   ` Sagar Acharya
2023-02-09 13:28     ` David Brown
2023-02-13 12:02       ` Sagar Acharya
2023-02-13 12:42         ` David Brown
2023-02-09 14:31     ` Jonathan Wakely
2023-02-08 12:45 ` David Brown [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4dc4cba6-fad2-10df-4c00-f31346feb3f4@westcontrol.com \
    --to=david@westcontrol.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=sagaracharya@tutanota.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).