From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id DC1AB3858C50 for ; Thu, 9 Feb 2023 14:31:20 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DC1AB3858C50 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-x62f.google.com with SMTP id hx15so6832919ejc.11 for ; Thu, 09 Feb 2023 06:31:20 -0800 (PST) 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:message-id:reply-to; bh=vE72trwjMf+I1b503c7BYs8tS9//ITtKA4v2MFAo3Vk=; b=V6wvWuG4+6rvh2v8sUxUKhn9gzfldaUTCQH8+bz96hxZRK/sQ70Fbrrd4ewDCKK0rl bd9jDrYfj0qinwzOuaTh9yuXNJTmQuSRhWg35zOSdhf5hgakpDb+7uveVRmPQFoCbnfu HLCcXFDFYeCMvxUpAchdC3ACV33KPDy5YBAHc/6K7DKvIeAjAdGqsdYj4IJ4aULoPzpX vz79E+Udd+yZz7P9o1Vo9i/4XaccgC3AocxRCkcdq8XuW3TL8Y3dCFsZAB0zLfCK0XhV j2xrxNvHm7vyG1KmS5gjGOfm6E38xwjFzr1+BzmHaUYXGzVwemK93wT1Hxm75fFmGvih DUsg== 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:message-id :reply-to; bh=vE72trwjMf+I1b503c7BYs8tS9//ITtKA4v2MFAo3Vk=; b=4LueTn+rqaIgWiBPQI+Kzb2scrZaHapvFEE2la/DWQiIlnQq65l6VzfWs5ztXk/4mC fq79GehEfVFuGOvLQM23H9KPgDsRrDAByz5fjuHiQRLRn0g3yct3kOq9W9b1oHBn52eb KZ+euSJ97WWqcjMenucapCCJtFgxFOPT9TmM1/bsD2NgDH2flH0Bel1kUhaZI9k9O333 v5hf2LqkY2yt+DxvtjeZ649BJ1Up3ATs5jrlRQw1Gt9bDChbiTS/L4iT8XPkjn0tnDB3 E4AzjEbXC61bFzWwaADfeWtzaOYOnW5pu/1waDYsB9tlW5Tpe9+o+VBhHPaytTuqEH7z Gvug== X-Gm-Message-State: AO0yUKUQKqRFOVbQTJzao5ya41KTdn3kMshtba8z4FGuVsPiEnj53t9n claY+HiQQcIPbywebyAXerIWOaYv2IS+J5gDe5/2TRDO X-Google-Smtp-Source: AK7set/0i/OFIkikX3T2ePWBpyyzkVwH+dvXEBwcOPCsWYbal6q+2fWv/W0AXO6C3CRx+ekCrhfrklUXNpl4v3tJHSQ= X-Received: by 2002:a17:906:90c1:b0:88f:9c9a:828 with SMTP id v1-20020a17090690c100b0088f9c9a0828mr2295401ejw.190.1675953079794; Thu, 09 Feb 2023 06:31:19 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Jonathan Wakely Date: Thu, 9 Feb 2023 14:31:08 +0000 Message-ID: Subject: Re: Cross compiler riscv64 building To: Sagar Acharya Cc: Gcc Help Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-0.8 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 Thu, 9 Feb 2023 at 11:20, Sagar Acharya wrote: > > I built binutils. Installed it at /usr/local/riscv64-unknown-elf directory > > Now, I tried building gcc with > ./configure --host=riscv64-unknown-elf Why would you do that? That's not what I suggested, and not what the links I gave suggest. And it's wrong. > make > > However, the gcc directory within gcc-12.2.0 has no Makefile made during configure command. So it enters gcc-12.2.0/gcc dir, sees no Makefile prepared, exits with error. > > How do I solve this? > > Thanking you > Sagar Acharya > https://designman.org > > > > 8 Feb 2023, 16:48 by jwakely.gcc@gmail.com: > > > On Wed, 8 Feb 2023 at 11:12, 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. > >> > > > > See https://wiki.osdev.org/GCC_Cross-Compiler > > > > In summary: > > Download the gcc and binutils source. > > Configure binutils with --prefix=$DIR --target=riscv64-unknown-elf for > > some $DIR. > > Run make && make install. > > Configure gcc with the same --prefix and --target options. > > Run make && make install. > > > > If you want a hosted target like riscv64-unknown-linux-gnu for > > compiling user-space programs, then you'll need to have a copy of the > > target headers and libraries available, and point GCC to them with the > > --sysroot option. > > See https://wiki.osdev.org/Hosted_GCC_Cross-Compiler > >