diff options
author | Mike Frysinger <vapier@gentoo.org> | 2022-02-15 05:35:57 +0300 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2022-02-17 04:00:27 +0300 |
commit | 40748cd73a0408be4095f03cdf12b9e2ff18c912 (patch) | |
tree | 881a20781d1041d866e83c41004b66d69ea1cc70 /newlib/libc/machine | |
parent | d1591ed4a11ba0b2730d6b846f0213c9a0e94b1c (diff) |
newlib: powerpc: simplify reallocr & callocr build logic
Replace the custom build rules (which require copying & pasting from the
current Makefile) with small stub files. This allows us to drop the rules
entirely and let Automake provide everything.
Diffstat (limited to 'newlib/libc/machine')
-rw-r--r-- | newlib/libc/machine/powerpc/Makefile.am | 8 | ||||
-rw-r--r-- | newlib/libc/machine/powerpc/Makefile.in | 20 | ||||
-rw-r--r-- | newlib/libc/machine/powerpc/vec_callocr.c | 2 | ||||
-rw-r--r-- | newlib/libc/machine/powerpc/vec_reallocr.c | 2 |
4 files changed, 18 insertions, 14 deletions
diff --git a/newlib/libc/machine/powerpc/Makefile.am b/newlib/libc/machine/powerpc/Makefile.am index 54d9c58c5..eebe640de 100644 --- a/newlib/libc/machine/powerpc/Makefile.am +++ b/newlib/libc/machine/powerpc/Makefile.am @@ -45,13 +45,7 @@ endif lib_a_DEPENDENCIES = $(lib_a_LIBADD) EXTRA_lib_a_SOURCES = \ vfprintf.c vfscanf.c \ - vec_malloc.c vec_calloc.c vec_free.c vec_realloc.c vec_mallocr.c \ + vec_malloc.c vec_calloc.c vec_free.c vec_realloc.c vec_mallocr.c vec_callocr.c vec_reallocr.c \ atosfix16.c atosfix32.c atosfix64.c atoufix16.c atoufix32.c atoufix64.c \ simdldtoa.c strtosfix16.c strtosfix32.c strtosfix64.c strtoufix16.c \ strtoufix32.c strtoufix64.c ufix64toa.c - -lib_a-vec_reallocr.o: vec_mallocr.c - $(CC) $(DEFS) -DINTERNAL_NEWLIB -DDEFINE_VECREALLOC $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vec_reallocr.o `test -f 'vec_mallocr.c' || echo '$(srcdir)/'`vec_mallocr.c - -lib_a-vec_callocr.o: vec_mallocr.c - $(CC) $(DEFS) -DINTERNAL_NEWLIB -DDEFINE_VECCALLOC $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vec_callocr.o `test -f 'vec_mallocr.c' || echo '$(srcdir)/'`vec_mallocr.c diff --git a/newlib/libc/machine/powerpc/Makefile.in b/newlib/libc/machine/powerpc/Makefile.in index 0ca6bd916..261c1e874 100644 --- a/newlib/libc/machine/powerpc/Makefile.in +++ b/newlib/libc/machine/powerpc/Makefile.in @@ -333,7 +333,7 @@ lib_a_LIBADD = $(am__append_1) $(am__append_2) lib_a_DEPENDENCIES = $(lib_a_LIBADD) EXTRA_lib_a_SOURCES = \ vfprintf.c vfscanf.c \ - vec_malloc.c vec_calloc.c vec_free.c vec_realloc.c vec_mallocr.c \ + vec_malloc.c vec_calloc.c vec_free.c vec_realloc.c vec_mallocr.c vec_callocr.c vec_reallocr.c \ atosfix16.c atosfix32.c atosfix64.c atoufix16.c atoufix32.c atoufix64.c \ simdldtoa.c strtosfix16.c strtosfix32.c strtosfix64.c strtoufix16.c \ strtoufix32.c strtoufix64.c ufix64toa.c @@ -440,6 +440,18 @@ lib_a-vec_mallocr.o: vec_mallocr.c lib_a-vec_mallocr.obj: vec_mallocr.c $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vec_mallocr.obj `if test -f 'vec_mallocr.c'; then $(CYGPATH_W) 'vec_mallocr.c'; else $(CYGPATH_W) '$(srcdir)/vec_mallocr.c'; fi` +lib_a-vec_callocr.o: vec_callocr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vec_callocr.o `test -f 'vec_callocr.c' || echo '$(srcdir)/'`vec_callocr.c + +lib_a-vec_callocr.obj: vec_callocr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vec_callocr.obj `if test -f 'vec_callocr.c'; then $(CYGPATH_W) 'vec_callocr.c'; else $(CYGPATH_W) '$(srcdir)/vec_callocr.c'; fi` + +lib_a-vec_reallocr.o: vec_reallocr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vec_reallocr.o `test -f 'vec_reallocr.c' || echo '$(srcdir)/'`vec_reallocr.c + +lib_a-vec_reallocr.obj: vec_reallocr.c + $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vec_reallocr.obj `if test -f 'vec_reallocr.c'; then $(CYGPATH_W) 'vec_reallocr.c'; else $(CYGPATH_W) '$(srcdir)/vec_reallocr.c'; fi` + lib_a-atosfix16.o: atosfix16.c $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-atosfix16.o `test -f 'atosfix16.c' || echo '$(srcdir)/'`atosfix16.c @@ -694,12 +706,6 @@ uninstall-am: .PRECIOUS: Makefile -lib_a-vec_reallocr.o: vec_mallocr.c - $(CC) $(DEFS) -DINTERNAL_NEWLIB -DDEFINE_VECREALLOC $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vec_reallocr.o `test -f 'vec_mallocr.c' || echo '$(srcdir)/'`vec_mallocr.c - -lib_a-vec_callocr.o: vec_mallocr.c - $(CC) $(DEFS) -DINTERNAL_NEWLIB -DDEFINE_VECCALLOC $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-vec_callocr.o `test -f 'vec_mallocr.c' || echo '$(srcdir)/'`vec_mallocr.c - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git a/newlib/libc/machine/powerpc/vec_callocr.c b/newlib/libc/machine/powerpc/vec_callocr.c new file mode 100644 index 000000000..6ce00d0cd --- /dev/null +++ b/newlib/libc/machine/powerpc/vec_callocr.c @@ -0,0 +1,2 @@ +#define DEFINE_VECCALLOC +#include "vec_mallocr.c" diff --git a/newlib/libc/machine/powerpc/vec_reallocr.c b/newlib/libc/machine/powerpc/vec_reallocr.c new file mode 100644 index 000000000..d1d99dec8 --- /dev/null +++ b/newlib/libc/machine/powerpc/vec_reallocr.c @@ -0,0 +1,2 @@ +#define DEFINE_VECREALLOC +#include "vec_mallocr.c" |