Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#74519 - [riscv64-elf-newlib] Compilation with nano specs fails

Attached to Project: Community Packages
Opened by Marian (maribu) - Wednesday, 20 April 2022, 13:48 GMT
Last edited by Massimiliano Torromeo (mtorromeo) - Monday, 25 April 2022, 11:46 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Compilation when using the nano specs fails with:

/usr/lib/gcc/riscv64-elf/11.1.0/../../../../riscv64-elf/bin/ld: cannot find -lm_nano
/usr/lib/gcc/riscv64-elf/11.1.0/../../../../riscv64-elf/bin/ld: cannot find -lgloss_nano
collect2: error: ld returned 1 exit status
make: *** [/home/fabian/forks/RIOT/examples/default/../../Makefile.include:728: /home/fabian/forks/RIOT/examples/default/bin/hifive1b/default.elf] Fehler 1

See https://github.com/RIOT-OS/RIOT/pull/17951#issuecomment-1102698116 for context.

I think this should fix the issue (untested, though):

--- PKGBUILD
+++ PKGBUILD
@@ -59,7 +59,7 @@

make DESTDIR="$pkgdir" install -j1

- find "$pkgdir" -regex ".*/lib\(c\|g\|rdimon\)\.a" -exec rename .a _nano.a '{}' \;
+ find "$pkgdir" -regex ".*/lib\(c\|g\|m\|rdimon\|gloss\)\.a" -exec rename .a _nano.a '{}' \;
install -d "$pkgdir"/usr/$_target/include/newlib-nano
install -m644 -t "$pkgdir"/usr/$_target/include/newlib-nano "$pkgdir"/usr/$_target/include/newlib.h
This task depends upon

Closed by  Massimiliano Torromeo (mtorromeo)
Monday, 25 April 2022, 11:46 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#66548 

Loading...