aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-02-01 00:46:42 -0500
committerMike Frysinger <vapier@gentoo.org>2022-02-03 20:45:47 -0500
commit4574c6037853789b69b7cce9a4264448eca24f08 (patch)
tree8002f780ed321fb8f71bb81da0c4606215a2a551
parent4aeba490165bc8585fb1d18037718406c0ec4d5b (diff)
downloadnewlib-4574c6037853789b69b7cce9a4264448eca24f08.zip
newlib-4574c6037853789b69b7cce9a4264448eca24f08.tar.gz
newlib-4574c6037853789b69b7cce9a4264448eca24f08.tar.bz2
newlib: arm & v850: simplify build rules
Let automake manage whether the objects are included in lib.a. This fixes failures after to commit 71086e8b2d70c1e71a8372f35d9901505fc72905 ("newlib: delete (most) redundant lib_a_CCASFLAGS=$(AM_CCASFLAGS)") due to automake generating different set of implicit rules, and the code in here assuming the names of the generated objects.
-rw-r--r--newlib/libc/sys/arm/Makefile.am10
-rw-r--r--newlib/libc/sys/arm/Makefile.in31
-rw-r--r--newlib/libc/sys/sysnecv850/Makefile.am19
-rw-r--r--newlib/libc/sys/sysnecv850/Makefile.in78
4 files changed, 60 insertions, 78 deletions
diff --git a/newlib/libc/sys/arm/Makefile.am b/newlib/libc/sys/arm/Makefile.am
index dda6ffb..9648137 100644
--- a/newlib/libc/sys/arm/Makefile.am
+++ b/newlib/libc/sys/arm/Makefile.am
@@ -6,16 +6,10 @@ AM_CCASFLAGS = $(AM_CPPFLAGS)
noinst_LIBRARIES = lib.a
+lib_a_SOURCES = access.c aeabi_atexit.c
if MAY_SUPPLY_SYSCALLS
-extra_objs = $(lpfx)libcfunc.o $(lpfx)trap.o $(lpfx)syscalls.o
-else
-extra_objs =
+lib_a_SOURCES += libcfunc.c trap.S syscalls.c
endif
-
-lib_a_SOURCES = access.c aeabi_atexit.c
-lib_a_LIBADD = $(extra_objs)
-EXTRA_lib_a_SOURCES = trap.S syscalls.c libcfunc.c
-lib_a_DEPENDENCIES = $(extra_objs)
lib_a_CFLAGS = $(AM_CFLAGS)
if MAY_SUPPLY_SYSCALLS
diff --git a/newlib/libc/sys/arm/Makefile.in b/newlib/libc/sys/arm/Makefile.in
index e7e7581..84d62e9 100644
--- a/newlib/libc/sys/arm/Makefile.in
+++ b/newlib/libc/sys/arm/Makefile.in
@@ -88,6 +88,7 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+@MAY_SUPPLY_SYSCALLS_TRUE@am__append_1 = libcfunc.c trap.S syscalls.c
subdir = sys/arm
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
@@ -117,9 +118,12 @@ am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
lib_a_AR = $(AR) $(ARFLAGS)
-@MAY_SUPPLY_SYSCALLS_TRUE@am__DEPENDENCIES_1 = $(lpfx)libcfunc.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)trap.o $(lpfx)syscalls.o
-am_lib_a_OBJECTS = lib_a-access.$(OBJEXT) lib_a-aeabi_atexit.$(OBJEXT)
+lib_a_LIBADD =
+@MAY_SUPPLY_SYSCALLS_TRUE@am__objects_1 = lib_a-libcfunc.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ trap.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-syscalls.$(OBJEXT)
+am_lib_a_OBJECTS = lib_a-access.$(OBJEXT) lib_a-aeabi_atexit.$(OBJEXT) \
+ $(am__objects_1)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -168,7 +172,7 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(lib_a_SOURCES) $(EXTRA_lib_a_SOURCES)
+SOURCES = $(lib_a_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -342,12 +346,7 @@ top_srcdir = @top_srcdir@
AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS) -I$(abs_newlib_basedir)/libc/machine/arm
AM_CCASFLAGS = $(AM_CPPFLAGS)
noinst_LIBRARIES = lib.a
-@MAY_SUPPLY_SYSCALLS_FALSE@extra_objs =
-@MAY_SUPPLY_SYSCALLS_TRUE@extra_objs = $(lpfx)libcfunc.o $(lpfx)trap.o $(lpfx)syscalls.o
-lib_a_SOURCES = access.c aeabi_atexit.c
-lib_a_LIBADD = $(extra_objs)
-EXTRA_lib_a_SOURCES = trap.S syscalls.c libcfunc.c
-lib_a_DEPENDENCIES = $(extra_objs)
+lib_a_SOURCES = access.c aeabi_atexit.c $(am__append_1)
lib_a_CFLAGS = $(AM_CFLAGS)
all: all-am
@@ -427,18 +426,18 @@ lib_a-aeabi_atexit.o: aeabi_atexit.c
lib_a-aeabi_atexit.obj: aeabi_atexit.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-aeabi_atexit.obj `if test -f 'aeabi_atexit.c'; then $(CYGPATH_W) 'aeabi_atexit.c'; else $(CYGPATH_W) '$(srcdir)/aeabi_atexit.c'; fi`
-lib_a-syscalls.o: syscalls.c
- $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-syscalls.o `test -f 'syscalls.c' || echo '$(srcdir)/'`syscalls.c
-
-lib_a-syscalls.obj: syscalls.c
- $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-syscalls.obj `if test -f 'syscalls.c'; then $(CYGPATH_W) 'syscalls.c'; else $(CYGPATH_W) '$(srcdir)/syscalls.c'; fi`
-
lib_a-libcfunc.o: libcfunc.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-libcfunc.o `test -f 'libcfunc.c' || echo '$(srcdir)/'`libcfunc.c
lib_a-libcfunc.obj: libcfunc.c
$(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-libcfunc.obj `if test -f 'libcfunc.c'; then $(CYGPATH_W) 'libcfunc.c'; else $(CYGPATH_W) '$(srcdir)/libcfunc.c'; fi`
+lib_a-syscalls.o: syscalls.c
+ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-syscalls.o `test -f 'syscalls.c' || echo '$(srcdir)/'`syscalls.c
+
+lib_a-syscalls.obj: syscalls.c
+ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(lib_a_CFLAGS) $(CFLAGS) -c -o lib_a-syscalls.obj `if test -f 'syscalls.c'; then $(CYGPATH_W) 'syscalls.c'; else $(CYGPATH_W) '$(srcdir)/syscalls.c'; fi`
+
mostlyclean-libtool:
-rm -f *.lo
diff --git a/newlib/libc/sys/sysnecv850/Makefile.am b/newlib/libc/sys/sysnecv850/Makefile.am
index bd8474f..874c40b 100644
--- a/newlib/libc/sys/sysnecv850/Makefile.am
+++ b/newlib/libc/sys/sysnecv850/Makefile.am
@@ -6,28 +6,15 @@ AM_CCASFLAGS = $(AM_CPPFLAGS)
noinst_LIBRARIES = lib.a
+lib_a_SOURCES =
if MAY_SUPPLY_SYSCALLS
-extra_objs = $(lpfx)_exit.o $(lpfx)access.o $(lpfx)chmod.o \
- $(lpfx)chown.o $(lpfx)close.o $(lpfx)creat.o $(lpfx)crt1.o \
- $(lpfx)execv.o $(lpfx)execve.o $(lpfx)fork.o $(lpfx)fstat.o \
- $(lpfx)getpid.o $(lpfx)isatty.o $(lpfx)kill.o $(lpfx)lseek.o \
- $(lpfx)open.o $(lpfx)pipe.o $(lpfx)read.o $(lpfx)link.o \
- $(lpfx)sbrk.o $(lpfx)stat.o $(lpfx)time.o $(lpfx)trap.o \
- $(lpfx)unlink.o $(lpfx)utime.o $(lpfx)wait.o $(lpfx)write.o \
- $(lpfx)times.o $(lpfx)gettime.o $(lpfx)rename.o
-else
-extra_objs =
-endif
-
-lib_a_LIBADD = $(extra_objs)
-EXTRA_lib_a_SOURCES = \
+lib_a_SOURCES += \
_exit.c access.c chmod.c chown.c close.c creat.c crt1.c \
execv.c execve.c fork.c fstat.c getpid.c isatty.c \
kill.c lseek.c open.c pipe.c read.c link.c \
sbrk.c stat.c time.c trap.S unlink.c utime.c wait.c write.c \
times.c gettime.c rename.c
-lib_a_SOURCES =
-lib_a_DEPENDENCIES = $(extra_objs)
+endif
lib_a_CFLAGS = $(AM_CFLAGS)
if MAY_SUPPLY_SYSCALLS
diff --git a/newlib/libc/sys/sysnecv850/Makefile.in b/newlib/libc/sys/sysnecv850/Makefile.in
index 734ca6b..bd19c2f 100644
--- a/newlib/libc/sys/sysnecv850/Makefile.in
+++ b/newlib/libc/sys/sysnecv850/Makefile.in
@@ -88,6 +88,13 @@ PRE_UNINSTALL = :
POST_UNINSTALL = :
build_triplet = @build@
host_triplet = @host@
+@MAY_SUPPLY_SYSCALLS_TRUE@am__append_1 = \
+@MAY_SUPPLY_SYSCALLS_TRUE@ _exit.c access.c chmod.c chown.c close.c creat.c crt1.c \
+@MAY_SUPPLY_SYSCALLS_TRUE@ execv.c execve.c fork.c fstat.c getpid.c isatty.c \
+@MAY_SUPPLY_SYSCALLS_TRUE@ kill.c lseek.c open.c pipe.c read.c link.c \
+@MAY_SUPPLY_SYSCALLS_TRUE@ sbrk.c stat.c time.c trap.S unlink.c utime.c wait.c write.c \
+@MAY_SUPPLY_SYSCALLS_TRUE@ times.c gettime.c rename.c
+
subdir = sys/sysnecv850
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/../../config/depstand.m4 \
@@ -117,23 +124,37 @@ am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@)
am__v_AR_0 = @echo " AR " $@;
am__v_AR_1 =
lib_a_AR = $(AR) $(ARFLAGS)
-@MAY_SUPPLY_SYSCALLS_TRUE@am__DEPENDENCIES_1 = $(lpfx)_exit.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)access.o $(lpfx)chmod.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)chown.o $(lpfx)close.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)creat.o $(lpfx)crt1.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)execv.o $(lpfx)execve.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)fork.o $(lpfx)fstat.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)getpid.o $(lpfx)isatty.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)kill.o $(lpfx)lseek.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)open.o $(lpfx)pipe.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)read.o $(lpfx)link.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)sbrk.o $(lpfx)stat.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)time.o $(lpfx)trap.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)unlink.o $(lpfx)utime.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)wait.o $(lpfx)write.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)times.o $(lpfx)gettime.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)rename.o
-am_lib_a_OBJECTS =
+lib_a_LIBADD =
+@MAY_SUPPLY_SYSCALLS_TRUE@am__objects_1 = lib_a-_exit.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-access.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-chmod.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-chown.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-close.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-creat.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-crt1.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-execv.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-execve.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-fork.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-fstat.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-getpid.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-isatty.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-kill.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-lseek.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-open.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-pipe.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-read.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-link.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-sbrk.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-stat.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-time.$(OBJEXT) trap.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-unlink.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-utime.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-wait.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-write.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-times.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-gettime.$(OBJEXT) \
+@MAY_SUPPLY_SYSCALLS_TRUE@ lib_a-rename.$(OBJEXT)
+am_lib_a_OBJECTS = $(am__objects_1)
lib_a_OBJECTS = $(am_lib_a_OBJECTS)
AM_V_P = $(am__v_P_@AM_V@)
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
@@ -182,7 +203,7 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
am__v_CCLD_0 = @echo " CCLD " $@;
am__v_CCLD_1 =
-SOURCES = $(lib_a_SOURCES) $(EXTRA_lib_a_SOURCES)
+SOURCES = $(lib_a_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
@@ -356,26 +377,7 @@ top_srcdir = @top_srcdir@
AM_CPPFLAGS = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
AM_CCASFLAGS = $(AM_CPPFLAGS)
noinst_LIBRARIES = lib.a
-@MAY_SUPPLY_SYSCALLS_FALSE@extra_objs =
-@MAY_SUPPLY_SYSCALLS_TRUE@extra_objs = $(lpfx)_exit.o $(lpfx)access.o $(lpfx)chmod.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)chown.o $(lpfx)close.o $(lpfx)creat.o $(lpfx)crt1.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)execv.o $(lpfx)execve.o $(lpfx)fork.o $(lpfx)fstat.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)getpid.o $(lpfx)isatty.o $(lpfx)kill.o $(lpfx)lseek.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)open.o $(lpfx)pipe.o $(lpfx)read.o $(lpfx)link.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)sbrk.o $(lpfx)stat.o $(lpfx)time.o $(lpfx)trap.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)unlink.o $(lpfx)utime.o $(lpfx)wait.o $(lpfx)write.o \
-@MAY_SUPPLY_SYSCALLS_TRUE@ $(lpfx)times.o $(lpfx)gettime.o $(lpfx)rename.o
-
-lib_a_LIBADD = $(extra_objs)
-EXTRA_lib_a_SOURCES = \
- _exit.c access.c chmod.c chown.c close.c creat.c crt1.c \
- execv.c execve.c fork.c fstat.c getpid.c isatty.c \
- kill.c lseek.c open.c pipe.c read.c link.c \
- sbrk.c stat.c time.c trap.S unlink.c utime.c wait.c write.c \
- times.c gettime.c rename.c
-
-lib_a_SOURCES =
-lib_a_DEPENDENCIES = $(extra_objs)
+lib_a_SOURCES = $(am__append_1)
lib_a_CFLAGS = $(AM_CFLAGS)
all: all-am