diff --git a/newlib/Makefile.in b/newlib/Makefile.in index 99a29465ac..9a32646abe 100644 --- a/newlib/Makefile.in +++ b/newlib/Makefile.in @@ -630,8 +630,8 @@ check_PROGRAMS = @HAVE_LIBC_MACHINE_AARCH64_TRUE@ libc/machine/aarch64/strrchr.S @HAVE_LIBC_MACHINE_AMDGCN_TRUE@am__append_67 = \ +@HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/_exit.c \ @HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/abort.c \ -@HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/exit.c \ @HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/atexit.c \ @HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/mlock.c \ @HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/getreent.c \ @@ -1892,8 +1892,8 @@ am__objects_51 = libc/ssp/libc_a-chk_fail.$(OBJEXT) \ @HAVE_LIBC_MACHINE_AARCH64_TRUE@ libc/machine/aarch64/libc_a-strnlen.$(OBJEXT) \ @HAVE_LIBC_MACHINE_AARCH64_TRUE@ libc/machine/aarch64/libc_a-strrchr-stub.$(OBJEXT) \ @HAVE_LIBC_MACHINE_AARCH64_TRUE@ libc/machine/aarch64/libc_a-strrchr.$(OBJEXT) -@HAVE_LIBC_MACHINE_AMDGCN_TRUE@am__objects_78 = libc/machine/amdgcn/libc_a-abort.$(OBJEXT) \ -@HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/libc_a-exit.$(OBJEXT) \ +@HAVE_LIBC_MACHINE_AMDGCN_TRUE@am__objects_78 = libc/machine/amdgcn/libc_a-_exit.$(OBJEXT) \ +@HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/libc_a-abort.$(OBJEXT) \ @HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/libc_a-atexit.$(OBJEXT) \ @HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/libc_a-mlock.$(OBJEXT) \ @HAVE_LIBC_MACHINE_AMDGCN_TRUE@ libc/machine/amdgcn/libc_a-getreent.$(OBJEXT) \ @@ -8161,10 +8161,10 @@ libc/machine/amdgcn/$(am__dirstamp): libc/machine/amdgcn/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) libc/machine/amdgcn/$(DEPDIR) @: > libc/machine/amdgcn/$(DEPDIR)/$(am__dirstamp) -libc/machine/amdgcn/libc_a-abort.$(OBJEXT): \ +libc/machine/amdgcn/libc_a-_exit.$(OBJEXT): \ libc/machine/amdgcn/$(am__dirstamp) \ libc/machine/amdgcn/$(DEPDIR)/$(am__dirstamp) -libc/machine/amdgcn/libc_a-exit.$(OBJEXT): \ +libc/machine/amdgcn/libc_a-abort.$(OBJEXT): \ libc/machine/amdgcn/$(am__dirstamp) \ libc/machine/amdgcn/$(DEPDIR)/$(am__dirstamp) libc/machine/amdgcn/libc_a-atexit.$(OBJEXT): \ @@ -12816,9 +12816,9 @@ distclean-compile: @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/aarch64/$(DEPDIR)/libc_a-strnlen.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/aarch64/$(DEPDIR)/libc_a-strrchr-stub.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/aarch64/$(DEPDIR)/libc_a-strrchr.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@libc/machine/amdgcn/$(DEPDIR)/libc_a-_exit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/amdgcn/$(DEPDIR)/libc_a-abort.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/amdgcn/$(DEPDIR)/libc_a-atexit.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@libc/machine/amdgcn/$(DEPDIR)/libc_a-exit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/amdgcn/$(DEPDIR)/libc_a-getreent.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/amdgcn/$(DEPDIR)/libc_a-mlock.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libc/machine/amdgcn/$(DEPDIR)/libc_a-signal.Po@am__quote@ @@ -33347,6 +33347,20 @@ libc/machine/aarch64/libc_a-strrchr-stub.obj: libc/machine/aarch64/strrchr-stub. @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/machine/aarch64/libc_a-strrchr-stub.obj `if test -f 'libc/machine/aarch64/strrchr-stub.c'; then $(CYGPATH_W) 'libc/machine/aarch64/strrchr-stub.c'; else $(CYGPATH_W) '$(srcdir)/libc/machine/aarch64/strrchr-stub.c'; fi` +libc/machine/amdgcn/libc_a-_exit.o: libc/machine/amdgcn/_exit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/machine/amdgcn/libc_a-_exit.o -MD -MP -MF libc/machine/amdgcn/$(DEPDIR)/libc_a-_exit.Tpo -c -o libc/machine/amdgcn/libc_a-_exit.o `test -f 'libc/machine/amdgcn/_exit.c' || echo '$(srcdir)/'`libc/machine/amdgcn/_exit.c +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/machine/amdgcn/$(DEPDIR)/libc_a-_exit.Tpo libc/machine/amdgcn/$(DEPDIR)/libc_a-_exit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/machine/amdgcn/_exit.c' object='libc/machine/amdgcn/libc_a-_exit.o' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/machine/amdgcn/libc_a-_exit.o `test -f 'libc/machine/amdgcn/_exit.c' || echo '$(srcdir)/'`libc/machine/amdgcn/_exit.c + +libc/machine/amdgcn/libc_a-_exit.obj: libc/machine/amdgcn/_exit.c +@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/machine/amdgcn/libc_a-_exit.obj -MD -MP -MF libc/machine/amdgcn/$(DEPDIR)/libc_a-_exit.Tpo -c -o libc/machine/amdgcn/libc_a-_exit.obj `if test -f 'libc/machine/amdgcn/_exit.c'; then $(CYGPATH_W) 'libc/machine/amdgcn/_exit.c'; else $(CYGPATH_W) '$(srcdir)/libc/machine/amdgcn/_exit.c'; fi` +@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/machine/amdgcn/$(DEPDIR)/libc_a-_exit.Tpo libc/machine/amdgcn/$(DEPDIR)/libc_a-_exit.Po +@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/machine/amdgcn/_exit.c' object='libc/machine/amdgcn/libc_a-_exit.obj' libtool=no @AMDEPBACKSLASH@ +@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ +@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/machine/amdgcn/libc_a-_exit.obj `if test -f 'libc/machine/amdgcn/_exit.c'; then $(CYGPATH_W) 'libc/machine/amdgcn/_exit.c'; else $(CYGPATH_W) '$(srcdir)/libc/machine/amdgcn/_exit.c'; fi` + libc/machine/amdgcn/libc_a-abort.o: libc/machine/amdgcn/abort.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/machine/amdgcn/libc_a-abort.o -MD -MP -MF libc/machine/amdgcn/$(DEPDIR)/libc_a-abort.Tpo -c -o libc/machine/amdgcn/libc_a-abort.o `test -f 'libc/machine/amdgcn/abort.c' || echo '$(srcdir)/'`libc/machine/amdgcn/abort.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/machine/amdgcn/$(DEPDIR)/libc_a-abort.Tpo libc/machine/amdgcn/$(DEPDIR)/libc_a-abort.Po @@ -33361,20 +33375,6 @@ libc/machine/amdgcn/libc_a-abort.obj: libc/machine/amdgcn/abort.c @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/machine/amdgcn/libc_a-abort.obj `if test -f 'libc/machine/amdgcn/abort.c'; then $(CYGPATH_W) 'libc/machine/amdgcn/abort.c'; else $(CYGPATH_W) '$(srcdir)/libc/machine/amdgcn/abort.c'; fi` -libc/machine/amdgcn/libc_a-exit.o: libc/machine/amdgcn/exit.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/machine/amdgcn/libc_a-exit.o -MD -MP -MF libc/machine/amdgcn/$(DEPDIR)/libc_a-exit.Tpo -c -o libc/machine/amdgcn/libc_a-exit.o `test -f 'libc/machine/amdgcn/exit.c' || echo '$(srcdir)/'`libc/machine/amdgcn/exit.c -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/machine/amdgcn/$(DEPDIR)/libc_a-exit.Tpo libc/machine/amdgcn/$(DEPDIR)/libc_a-exit.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/machine/amdgcn/exit.c' object='libc/machine/amdgcn/libc_a-exit.o' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/machine/amdgcn/libc_a-exit.o `test -f 'libc/machine/amdgcn/exit.c' || echo '$(srcdir)/'`libc/machine/amdgcn/exit.c - -libc/machine/amdgcn/libc_a-exit.obj: libc/machine/amdgcn/exit.c -@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/machine/amdgcn/libc_a-exit.obj -MD -MP -MF libc/machine/amdgcn/$(DEPDIR)/libc_a-exit.Tpo -c -o libc/machine/amdgcn/libc_a-exit.obj `if test -f 'libc/machine/amdgcn/exit.c'; then $(CYGPATH_W) 'libc/machine/amdgcn/exit.c'; else $(CYGPATH_W) '$(srcdir)/libc/machine/amdgcn/exit.c'; fi` -@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/machine/amdgcn/$(DEPDIR)/libc_a-exit.Tpo libc/machine/amdgcn/$(DEPDIR)/libc_a-exit.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/machine/amdgcn/exit.c' object='libc/machine/amdgcn/libc_a-exit.obj' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/machine/amdgcn/libc_a-exit.obj `if test -f 'libc/machine/amdgcn/exit.c'; then $(CYGPATH_W) 'libc/machine/amdgcn/exit.c'; else $(CYGPATH_W) '$(srcdir)/libc/machine/amdgcn/exit.c'; fi` - libc/machine/amdgcn/libc_a-atexit.o: libc/machine/amdgcn/atexit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/machine/amdgcn/libc_a-atexit.o -MD -MP -MF libc/machine/amdgcn/$(DEPDIR)/libc_a-atexit.Tpo -c -o libc/machine/amdgcn/libc_a-atexit.o `test -f 'libc/machine/amdgcn/atexit.c' || echo '$(srcdir)/'`libc/machine/amdgcn/atexit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/machine/amdgcn/$(DEPDIR)/libc_a-atexit.Tpo libc/machine/amdgcn/$(DEPDIR)/libc_a-atexit.Po diff --git a/newlib/libc/machine/amdgcn/Makefile.inc b/newlib/libc/machine/amdgcn/Makefile.inc index d26603aa8d..e1fc5ae4d9 100644 --- a/newlib/libc/machine/amdgcn/Makefile.inc +++ b/newlib/libc/machine/amdgcn/Makefile.inc @@ -1,6 +1,6 @@ libc_a_SOURCES += \ + %D%/_exit.c \ %D%/abort.c \ - %D%/exit.c \ %D%/atexit.c \ %D%/mlock.c \ %D%/getreent.c \ diff --git a/newlib/libc/machine/amdgcn/exit.c b/newlib/libc/machine/amdgcn/_exit.c similarity index 95% rename from newlib/libc/machine/amdgcn/exit.c rename to newlib/libc/machine/amdgcn/_exit.c index bdd532edd7..82171aff98 100644 --- a/newlib/libc/machine/amdgcn/exit.c +++ b/newlib/libc/machine/amdgcn/_exit.c @@ -13,11 +13,11 @@ * they apply. */ -#include +#include #include "exit-value.h" void __attribute__((noreturn)) -exit (int val) +_exit (int val) { exit_with_status_and_signal (val, 0); } diff --git a/newlib/libc/machine/amdgcn/atexit.c b/newlib/libc/machine/amdgcn/atexit.c index 674571435c..8ddd92cfaf 100644 --- a/newlib/libc/machine/amdgcn/atexit.c +++ b/newlib/libc/machine/amdgcn/atexit.c @@ -18,8 +18,7 @@ int atexit (void (*function)(void)) { - /* Our current implementation of exit does not run functions registered with - atexit, so fail here. */ + /* Fail here. */ abort (); return 1; }