public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Use newlib nano specific libm.
@ 2020-01-29 22:46 Jim Wilson
  2020-01-31 11:42 ` Corinna Vinschen
  0 siblings, 1 reply; 2+ messages in thread
From: Jim Wilson @ 2020-01-29 22:46 UTC (permalink / raw)
  To: newlib; +Cc: Jim Wilson

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>
---
 libgloss/riscv/nano.specs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libgloss/riscv/nano.specs b/libgloss/riscv/nano.specs
index 89fd23176..e12e31384 100644
--- a/libgloss/riscv/nano.specs
+++ b/libgloss/riscv/nano.specs
@@ -15,7 +15,7 @@
 %(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)
+%(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}}
-- 
2.17.1

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] RISC-V: Use newlib nano specific libm.
  2020-01-29 22:46 [PATCH] RISC-V: Use newlib nano specific libm Jim Wilson
@ 2020-01-31 11:42 ` Corinna Vinschen
  0 siblings, 0 replies; 2+ messages in thread
From: Corinna Vinschen @ 2020-01-31 11:42 UTC (permalink / raw)
  To: newlib

[-- Attachment #1: Type: text/plain, Size: 1289 bytes --]

On Jan 29 14:46, Jim Wilson wrote:
> 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>
> ---
>  libgloss/riscv/nano.specs | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libgloss/riscv/nano.specs b/libgloss/riscv/nano.specs
> index 89fd23176..e12e31384 100644
> --- a/libgloss/riscv/nano.specs
> +++ b/libgloss/riscv/nano.specs
> @@ -15,7 +15,7 @@
>  %(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)
> +%(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}}
> -- 
> 2.17.1

Pushed.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-01-31 11:42 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-01-29 22:46 [PATCH] RISC-V: Use newlib nano specific libm Jim Wilson
2020-01-31 11:42 ` Corinna Vinschen

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).