public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ekaitz Zarraga <ekaitz@elenq.tech>
To: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>
Cc: Andrew Waterman <andrew@sifive.com>
Subject: RISC-V backport to 4.6.4 - Questions about libgcc
Date: Fri, 13 May 2022 11:05:46 +0000	[thread overview]
Message-ID: <1_3ejhGMPA-oYW6RSRs8qzi3FQHCdy--s1iXCi2CvXIOXdaHMXy0Npl4lsSYAkNimQXB3sWoLvm4PTB2eShtr2qP99iriMvqoyJIoFq5hQ8=@elenq.tech> (raw)

Hi all,

I'm backporting RISC-V support to GCC 4.6.4 in order to obtain a bootstrappable GCC for RISC-V and I'm finding some issues I can't solve myself. Maybe you can help.

I managed to backport the core of gcc, so now I can compile to assembly.

The problems came with the backport of `libgcc` because I don't understand the building process very well (and it also changed from gcc 4.6.4 to 7.5). I managed to make it build by copying many parts of the build system from `libgcc/config/riscv` to `gcc/config/riscv` because I was obtaining errors like: "Extra parts are not coherent". At the moment I managed it to compile but when I try to build software with it it's unable to find some of the functions that should be available in libgcc:

```
printf_fphex.c:212: undefined reference to `__unordtf2'
printf_fphex.c:212: undefined reference to `__letf2'
```

Can anyone point me to what I might be missing here? I'm out of ideas.

If anyone is interested on taking a deeper look, the repository with my changes can be found here:
https://github.com/ekaitz-zarraga/gcc

Thank you very much,
Ekaitz

                 reply	other threads:[~2022-05-13 11:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='1_3ejhGMPA-oYW6RSRs8qzi3FQHCdy--s1iXCi2CvXIOXdaHMXy0Npl4lsSYAkNimQXB3sWoLvm4PTB2eShtr2qP99iriMvqoyJIoFq5hQ8=@elenq.tech' \
    --to=ekaitz@elenq.tech \
    --cc=andrew@sifive.com \
    --cc=gcc@gcc.gnu.org \
    /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).