4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-19 12:59:21 +08:00
Jim Wilson 57f1f6c879 RISC-V: Use newlib nano specific libm.
The libm gamma functions use the _gamma_signgam field of the reentrant
structure, which changes offset with the --enable-newlib-reent-small
configure option, which means we need to use a newlib nano specific
version of libm in addition to libc in the nano.specs file.  Reported
by Keith Packard.  There is a riscv-gnu-toolchain patch that goes
along with this to create the new libm_nano.a file.

Signed-off-by: Jim Wilson <jimw@sifive.com>
2020-10-14 10:54:11 -04:00

24 lines
631 B
Plaintext

%rename link nano_link
%rename link_gcc_c_sequence nano_link_gcc_c_sequence
%rename cpp nano_cpp
*cpp:
-isystem =/include/newlib-nano %(nano_cpp)
*nano_libc:
-lc_nano
*nano_libgloss:
%{specs=nosys.specs:-lnosys} %{!specs=nosys.specs:-lgloss_nano}
*link_gcc_c_sequence:
%(nano_link_gcc_c_sequence) --start-group %G %(nano_libc) %(nano_libgloss) --end-group
*link:
%(nano_link) %:replace-outfile(-lc -lc_nano) %:replace-outfile(-lg -lg_nano) %:replace-outfile(-lm -lm_nano)
*lib:
%{!shared:%{g*:-lg_nano} %{!p:%{!pg:-lc_nano}}%{p:-lc_p}%{pg:-lc_p}}
# ??? Maybe put --gc-sections option in here?