public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] libm/machine/arm: Rename s*_fma.c -> s*_fma_arm.c
@ 2020-09-01 19:49 Keith Packard
  2020-09-02  4:44 ` Sebastian Huber
  2020-09-02  8:05 ` Corinna Vinschen
  0 siblings, 2 replies; 5+ messages in thread
From: Keith Packard @ 2020-09-01 19:49 UTC (permalink / raw)
  To: newlib

This is required to avoid colliding with files built from libm/common
that would end up with the same object name.

When libm.a was constructed from the individual sub-libraries, the
contents of the libm/common files would be replaced by that from
libm/machine/arm with the same name.

Signed-off-by: Keith Packard <keithp@keithp.com>
---
 newlib/libm/machine/arm/Makefile.am           |  4 ++--
 newlib/libm/machine/arm/Makefile.in           | 24 +++++++++----------
 .../libm/machine/arm/{s_fma.c => s_fma_arm.c} |  0
 .../machine/arm/{sf_fma.c => sf_fma_arm.c}    |  0
 4 files changed, 14 insertions(+), 14 deletions(-)
 rename newlib/libm/machine/arm/{s_fma.c => s_fma_arm.c} (100%)
 rename newlib/libm/machine/arm/{sf_fma.c => sf_fma_arm.c} (100%)

diff --git a/newlib/libm/machine/arm/Makefile.am b/newlib/libm/machine/arm/Makefile.am
index 09a266c43..ccb134d6a 100644
--- a/newlib/libm/machine/arm/Makefile.am
+++ b/newlib/libm/machine/arm/Makefile.am
@@ -10,14 +10,14 @@ LIB_SOURCES = \
 	ef_sqrt.c \
 	s_ceil.c \
 	s_floor.c \
-	s_fma.c \
+	s_fma_arm.c \
 	s_nearbyint.c \
 	s_rint.c \
 	s_round.c \
 	s_trunc.c \
 	sf_ceil.c \
 	sf_floor.c \
-	sf_fma.c \
+	sf_fma_arm.c \
 	sf_nearbyint.c \
 	sf_rint.c \
 	sf_round.c \
diff --git a/newlib/libm/machine/arm/Makefile.in b/newlib/libm/machine/arm/Makefile.in
index e7bca5f66..49c536d1c 100644
--- a/newlib/libm/machine/arm/Makefile.in
+++ b/newlib/libm/machine/arm/Makefile.in
@@ -72,10 +72,10 @@ lib_a_AR = $(AR) $(ARFLAGS)
 lib_a_LIBADD =
 am__objects_1 = lib_a-e_sqrt.$(OBJEXT) lib_a-ef_sqrt.$(OBJEXT) \
 	lib_a-s_ceil.$(OBJEXT) lib_a-s_floor.$(OBJEXT) \
-	lib_a-s_fma.$(OBJEXT) lib_a-s_nearbyint.$(OBJEXT) \
+	lib_a-s_fma_arm.$(OBJEXT) lib_a-s_nearbyint.$(OBJEXT) \
 	lib_a-s_rint.$(OBJEXT) lib_a-s_round.$(OBJEXT) \
 	lib_a-s_trunc.$(OBJEXT) lib_a-sf_ceil.$(OBJEXT) \
-	lib_a-sf_floor.$(OBJEXT) lib_a-sf_fma.$(OBJEXT) \
+	lib_a-sf_floor.$(OBJEXT) lib_a-sf_fma_arm.$(OBJEXT) \
 	lib_a-sf_nearbyint.$(OBJEXT) lib_a-sf_rint.$(OBJEXT) \
 	lib_a-sf_round.$(OBJEXT) lib_a-sf_trunc.$(OBJEXT) \
 	lib_a-feclearexcept.$(OBJEXT) lib_a-fe_dfl_env.$(OBJEXT) \
@@ -216,14 +216,14 @@ LIB_SOURCES = \
 	ef_sqrt.c \
 	s_ceil.c \
 	s_floor.c \
-	s_fma.c \
+	s_fma_arm.c \
 	s_nearbyint.c \
 	s_rint.c \
 	s_round.c \
 	s_trunc.c \
 	sf_ceil.c \
 	sf_floor.c \
-	sf_fma.c \
+	sf_fma_arm.c \
 	sf_nearbyint.c \
 	sf_rint.c \
 	sf_round.c \
@@ -344,11 +344,11 @@ lib_a-s_floor.o: s_floor.c
 lib_a-s_floor.obj: s_floor.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_floor.obj `if test -f 's_floor.c'; then $(CYGPATH_W) 's_floor.c'; else $(CYGPATH_W) '$(srcdir)/s_floor.c'; fi`
 
-lib_a-s_fma.o: s_fma.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_fma.o `test -f 's_fma.c' || echo '$(srcdir)/'`s_fma.c
+lib_a-s_fma_arm.o: s_fma_arm.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_fma_arm.o `test -f 's_fma_arm.c' || echo '$(srcdir)/'`s_fma_arm.c
 
-lib_a-s_fma.obj: s_fma.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_fma.obj `if test -f 's_fma.c'; then $(CYGPATH_W) 's_fma.c'; else $(CYGPATH_W) '$(srcdir)/s_fma.c'; fi`
+lib_a-s_fma_arm.obj: s_fma_arm.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_fma_arm.obj `if test -f 's_fma_arm.c'; then $(CYGPATH_W) 's_fma_arm.c'; else $(CYGPATH_W) '$(srcdir)/s_fma_arm.c'; fi`
 
 lib_a-s_nearbyint.o: s_nearbyint.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-s_nearbyint.o `test -f 's_nearbyint.c' || echo '$(srcdir)/'`s_nearbyint.c
@@ -386,11 +386,11 @@ lib_a-sf_floor.o: sf_floor.c
 lib_a-sf_floor.obj: sf_floor.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_floor.obj `if test -f 'sf_floor.c'; then $(CYGPATH_W) 'sf_floor.c'; else $(CYGPATH_W) '$(srcdir)/sf_floor.c'; fi`
 
-lib_a-sf_fma.o: sf_fma.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_fma.o `test -f 'sf_fma.c' || echo '$(srcdir)/'`sf_fma.c
+lib_a-sf_fma_arm.o: sf_fma_arm.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_fma_arm.o `test -f 'sf_fma_arm.c' || echo '$(srcdir)/'`sf_fma_arm.c
 
-lib_a-sf_fma.obj: sf_fma.c
-	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_fma.obj `if test -f 'sf_fma.c'; then $(CYGPATH_W) 'sf_fma.c'; else $(CYGPATH_W) '$(srcdir)/sf_fma.c'; fi`
+lib_a-sf_fma_arm.obj: sf_fma_arm.c
+	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_fma_arm.obj `if test -f 'sf_fma_arm.c'; then $(CYGPATH_W) 'sf_fma_arm.c'; else $(CYGPATH_W) '$(srcdir)/sf_fma_arm.c'; fi`
 
 lib_a-sf_nearbyint.o: sf_nearbyint.c
 	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-sf_nearbyint.o `test -f 'sf_nearbyint.c' || echo '$(srcdir)/'`sf_nearbyint.c
diff --git a/newlib/libm/machine/arm/s_fma.c b/newlib/libm/machine/arm/s_fma_arm.c
similarity index 100%
rename from newlib/libm/machine/arm/s_fma.c
rename to newlib/libm/machine/arm/s_fma_arm.c
diff --git a/newlib/libm/machine/arm/sf_fma.c b/newlib/libm/machine/arm/sf_fma_arm.c
similarity index 100%
rename from newlib/libm/machine/arm/sf_fma.c
rename to newlib/libm/machine/arm/sf_fma_arm.c
-- 
2.28.0


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

* Re: [PATCH] libm/machine/arm: Rename s*_fma.c -> s*_fma_arm.c
  2020-09-01 19:49 [PATCH] libm/machine/arm: Rename s*_fma.c -> s*_fma_arm.c Keith Packard
@ 2020-09-02  4:44 ` Sebastian Huber
  2020-09-02  5:24   ` Sebastian Huber
  2020-09-02  5:26   ` Keith Packard
  2020-09-02  8:05 ` Corinna Vinschen
  1 sibling, 2 replies; 5+ messages in thread
From: Sebastian Huber @ 2020-09-02  4:44 UTC (permalink / raw)
  To: Keith Packard, newlib

On 01/09/2020 21:49, Keith Packard via Newlib wrote:
> This is required to avoid colliding with files built from libm/common
> that would end up with the same object name.
> 
> When libm.a was constructed from the individual sub-libraries, the
> contents of the libm/common files would be replaced by that from
> libm/machine/arm with the same name.
> 
> Signed-off-by: Keith Packard<keithp@keithp.com>

Thanks for the patch. I think at least riscv has the same issue.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

* Re: [PATCH] libm/machine/arm: Rename s*_fma.c -> s*_fma_arm.c
  2020-09-02  4:44 ` Sebastian Huber
@ 2020-09-02  5:24   ` Sebastian Huber
  2020-09-02  5:26   ` Keith Packard
  1 sibling, 0 replies; 5+ messages in thread
From: Sebastian Huber @ 2020-09-02  5:24 UTC (permalink / raw)
  To: Keith Packard, newlib

On 02/09/2020 06:44, Sebastian Huber wrote:
> On 01/09/2020 21:49, Keith Packard via Newlib wrote:
>> This is required to avoid colliding with files built from libm/common
>> that would end up with the same object name.
>>
>> When libm.a was constructed from the individual sub-libraries, the
>> contents of the libm/common files would be replaced by that from
>> libm/machine/arm with the same name.
>>
>> Signed-off-by: Keith Packard<keithp@keithp.com>
> 
> Thanks for the patch. I think at least riscv has the same issue.

Independent of the potential riscv issue, I can confirm that this patch 
fixes the arm libm.a.

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber@embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.

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

* Re: [PATCH] libm/machine/arm: Rename s*_fma.c -> s*_fma_arm.c
  2020-09-02  4:44 ` Sebastian Huber
  2020-09-02  5:24   ` Sebastian Huber
@ 2020-09-02  5:26   ` Keith Packard
  1 sibling, 0 replies; 5+ messages in thread
From: Keith Packard @ 2020-09-02  5:26 UTC (permalink / raw)
  To: Sebastian Huber, newlib

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

Sebastian Huber <sebastian.huber@embedded-brains.de> writes:

> Thanks for the patch. I think at least riscv has the same issue.

Yes, it does. I got caught fixing the picolibc build system to match
newlib semantics where an architecture can replace any object in either
libm or libc. I'll get the riscv newlib build fixed tomorrow.

-- 
-keith

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

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

* Re: [PATCH] libm/machine/arm: Rename s*_fma.c -> s*_fma_arm.c
  2020-09-01 19:49 [PATCH] libm/machine/arm: Rename s*_fma.c -> s*_fma_arm.c Keith Packard
  2020-09-02  4:44 ` Sebastian Huber
@ 2020-09-02  8:05 ` Corinna Vinschen
  1 sibling, 0 replies; 5+ messages in thread
From: Corinna Vinschen @ 2020-09-02  8:05 UTC (permalink / raw)
  To: newlib

On Sep  1 12:49, Keith Packard via Newlib wrote:
> This is required to avoid colliding with files built from libm/common
> that would end up with the same object name.
> 
> When libm.a was constructed from the individual sub-libraries, the
> contents of the libm/common files would be replaced by that from
> libm/machine/arm with the same name.
> 
> Signed-off-by: Keith Packard <keithp@keithp.com>
> ---
>  newlib/libm/machine/arm/Makefile.am           |  4 ++--
>  newlib/libm/machine/arm/Makefile.in           | 24 +++++++++----------
>  .../libm/machine/arm/{s_fma.c => s_fma_arm.c} |  0
>  .../machine/arm/{sf_fma.c => sf_fma_arm.c}    |  0
>  4 files changed, 14 insertions(+), 14 deletions(-)
>  rename newlib/libm/machine/arm/{s_fma.c => s_fma_arm.c} (100%)
>  rename newlib/libm/machine/arm/{sf_fma.c => sf_fma_arm.c} (100%)

Pushed.


Thanks,
Corinna


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

end of thread, other threads:[~2020-09-02  8:05 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-01 19:49 [PATCH] libm/machine/arm: Rename s*_fma.c -> s*_fma_arm.c Keith Packard
2020-09-02  4:44 ` Sebastian Huber
2020-09-02  5:24   ` Sebastian Huber
2020-09-02  5:26   ` Keith Packard
2020-09-02  8:05 ` 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).