From: mikarpenko <mikarpenko@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Closed]: [WIP][RFC] New package: cross-riscv64-none-elf
Date: Sat, 02 Mar 2024 07:58:01 +0100 [thread overview]
Message-ID: <20240302065801.6B9122B4D6@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-48614@inbox.vuxu.org>
[-- Attachment #1: Type: text/plain, Size: 3278 bytes --]
There's a closed pull request on the void-packages repository
[WIP][RFC] New package: cross-riscv64-none-elf
https://github.com/void-linux/void-packages/pull/48614
Description:
I am trying to package cross toolchain for bare metal risc-v targets and have some difficulties with building GCC. The build fails with a lot of errors while building `libgcc`:
```
/builddir/cross-riscv64-none-elf-gcc-13.2.0/build/./gcc/xgcc -B/builddir/cross-riscv64-none-elf-gcc-13.2.0/build/./gcc/ -B/usr/riscv64-none-elf/bin/ -B/usr/riscv64-none-elf/l
ib/ -isystem /usr/riscv64-none-elf/include -isystem /usr/riscv64-none-elf/sys-include -g -Os -mcmodel=medany -ffunction-sections -fdata-sections -march=rv32i -mabi=ilp32 -
O2 -g -Os -mcmodel=medany -ffunction-sections -fdata-sections -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wstrict-prototypes
-Wmissing-prototypes -Wold-style-definition -isystem ./include -g -DIN_LIBGCC2 -fbuilding-libgcc -fno-stack-protector -Dinhibit_libc -I. -I. -I../../../.././gcc -I../../.
./../../libgcc -I../../../../../libgcc/. -I../../../../../libgcc/../gcc -I../../../../../libgcc/../include -DHAVE_CC_TLS -o _gcov_interval_profiler.o -MT _gcov_interval_pr
ofiler.o -MD -MP -MF _gcov_interval_profiler.dep -DL_gcov_interval_profiler -c ../../../../../libgcc/libgcov-profiler.c
In file included from ../../../../../libgcc/libgcov-merge.c:26:
../../../../../libgcc/libgcov.h:49:10: fatal error: sys/mman.h: No such file or directory
49 | #include <sys/mman.h>
| ^~~~~~~~~~~~
compilation terminated.
make[4]: *** [Makefile:924: _gcov_merge_add.o] Error 1
```
And the file is actually there:
```
find . -name mman.h
./masterdir-x86_64/usr/include/bits/mman.h
./masterdir-x86_64/usr/include/asm/mman.h
./masterdir-x86_64/usr/include/sys/mman.h
./masterdir-x86_64/usr/include/asm-generic/mman.h
./masterdir-x86_64/usr/include/linux/mman.h
./masterdir-x86_64/builddir/cross-riscv64-none-elf-gcc-13.2.0/fixincludes/tests/base/sys/mman.h
````
There is a workaround with patching `libgconv.h` and disabling `HAVE_SYS_MMAN_H` or using `--disable-gcov` configuration flag, but I don't think this is the right way to go.
At the same time I could successfully manually build it from sources on host system with almost the same set of configuration flags except for those pointing to different system directories. It looks like I am missing one step to build the package, and I would appreciate any help. I can attach full configuration and build logs if it will be helpful.
prev parent reply other threads:[~2024-03-02 6:58 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-08 21:42 [PR PATCH] " mikarpenko
2024-03-02 6:58 ` mikarpenko
2024-03-02 6:58 ` mikarpenko [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=20240302065801.6B9122B4D6@inbox.vuxu.org \
--to=mikarpenko@users.noreply.github.com \
--cc=ml@inbox.vuxu.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 NNTP newsgroup(s).