FS#66548 - [riscv64-elf-newlib] libgloss_nano.a not shipped but specified in nano.specs

Attached to Project: Community Packages
Opened by Janis König (LeonardK) - Tuesday, 05 May 2020, 15:38 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Monday, 25 April 2022, 11:47 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Filipe Laíns (FFY00)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 3
Private No

Details

Description:

The nano specs files, e.g. /usr/riscv64-elf/lib/nano.specs, specify that the compiler should link against -lgloss_nano, however this file is not shipped as part of this package. The pre-built GNU embedded toolchain at https://www.sifive.com/boards/ contains such a file, which is required to use the Freedom E SDK. Please excuse, if this is simply a different toolchain targeting a different platform and thus the wrong place to report.

Additional info:
* package version(s): 3.3.0-1
* config and/or log files etc.: See "reproduce"
* link to upstream bug report, if any: N/A

Steps to reproduce:

1. Create a minimal C main function
2. Compile using

$ riscv64-elf-gcc --specs=nano.specs mwe.o -o mwe
/usr/lib/gcc/riscv64-elf/9.3.0/../../../../riscv64-elf/bin/ld: cannot find -lgloss_nano
collect2: error: ld returned 1 exit status
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Monday, 25 April 2022, 11:47 GMT
Reason for closing:  Fixed
Additional comments about closing:  riscv64-elf-newlib-4.1.0-2
Comment by Filipe Laíns (FFY00) - Tuesday, 05 May 2020, 16:48 GMT
> Please excuse, if this is simply a different toolchain targeting a different platform and thus the wrong place to report.

No, this is correct. Sorry. I'll try to fix it soon.
Comment by Janis König (LeonardK) - Tuesday, 05 May 2020, 19:25 GMT
Thanks a bunch! I'd like to have been more helpful, but I couldn't find the issue in the PKGBUILD. For what it's worth, the AUR package riscv64-unknown-elf-newlib does ship the library. Thanks for maintaining!
Comment by Filipe Laíns (FFY00) - Tuesday, 05 May 2020, 19:28 GMT
I didn't include it in the build because it increases build time and I thought nobody was making it. I didn't know about the nano.specs issue though.
Comment by Xiretza (xiretza) - Sunday, 23 August 2020, 09:56 GMT
The attached patch should fix this problem.
Comment by Thomas Weißschuh (t-8ch) - Sunday, 24 January 2021, 23:57 GMT
libm_nano is also missing from the package.
In newlib 4.1.0 libm_nano is also used by nano.specs (it wasn't before), so most nano builds will probably break.

Loading...