Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Johnston <jjohnstn@redhat.com>2005-09-01 00:39:43 +0400
committerJeff Johnston <jjohnstn@redhat.com>2005-09-01 00:39:43 +0400
commit45c8bb8f8cd221a0f4ad3c920a315eacea4fca94 (patch)
tree76f3f6f7754d99b4a692d336d0f1f4ac24c8d614 /newlib/libc/sys
parent53fabb7b243f1f1f357d90978c142d75b7f6b711 (diff)
2005-08-31 Paul Brook <paul@codesourcery.com>
* configure.host: Set have_crt0 to no for Arm targts when not providing syscalls. Set sys_dir=arm unconditionally. Default have_crt0 based on sys_dir. * configure.in: Use have_crt0. * libc/configure.in: Ditto. * libc/sys/configure.in: Ditto. * configure: Regenerate. * libc/configure: Regenerate. * libc/sys/configure: Regenerate. * libc/sys/arm/Makefile.am (lib_a_SOURCES): Add aeabi_atexit.c. Only build other files when providing syscalls. * libc/sys/arm/Makefile.in: Regenerate. * libc/sys/arm/aeabi_atexit.c: New file.
Diffstat (limited to 'newlib/libc/sys')
-rw-r--r--newlib/libc/sys/arm/Makefile.am6
-rw-r--r--newlib/libc/sys/arm/Makefile.in8
-rw-r--r--newlib/libc/sys/arm/aeabi_atexit.c10
-rwxr-xr-xnewlib/libc/sys/configure2
-rw-r--r--newlib/libc/sys/configure.in2
5 files changed, 20 insertions, 8 deletions
diff --git a/newlib/libc/sys/arm/Makefile.am b/newlib/libc/sys/arm/Makefile.am
index 76504f9d9..7749d4aff 100644
--- a/newlib/libc/sys/arm/Makefile.am
+++ b/newlib/libc/sys/arm/Makefile.am
@@ -7,16 +7,18 @@ INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
noinst_LIBRARIES = lib.a
if MAY_SUPPLY_SYSCALLS
-extra_objs = syscalls.o
+extra_objs = libcfunc.o trap.o syscalls.o
else
extra_objs =
endif
-lib_a_SOURCES = libcfunc.c trap.S
+lib_a_SOURCES = aeabi_atexit.c
lib_a_LIBADD = $(extra_objs)
lib_a_DEPENDENCIES = $(extra_objs)
+if MAY_SUPPLY_SYSCALLS
all: crt0.o
+endif
ACLOCAL_AMFLAGS = -I ../../..
CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
diff --git a/newlib/libc/sys/arm/Makefile.in b/newlib/libc/sys/arm/Makefile.in
index 942f909b2..323db9c9b 100644
--- a/newlib/libc/sys/arm/Makefile.in
+++ b/newlib/libc/sys/arm/Makefile.in
@@ -88,10 +88,10 @@ AUTOMAKE_OPTIONS = cygnus
INCLUDES = $(NEWLIB_CFLAGS) $(CROSS_CFLAGS) $(TARGET_CFLAGS)
noinst_LIBRARIES = lib.a
-@MAY_SUPPLY_SYSCALLS_TRUE@extra_objs = syscalls.o
+@MAY_SUPPLY_SYSCALLS_TRUE@extra_objs = libcfunc.o trap.o syscalls.o
@MAY_SUPPLY_SYSCALLS_FALSE@extra_objs =
-lib_a_SOURCES = libcfunc.c trap.S
+lib_a_SOURCES = aeabi_atexit.c
lib_a_LIBADD = $(extra_objs)
lib_a_DEPENDENCIES = $(extra_objs)
@@ -106,7 +106,7 @@ LIBRARIES = $(noinst_LIBRARIES)
DEFS = @DEFS@ -I. -I$(srcdir)
CPPFLAGS = @CPPFLAGS@
LIBS = @LIBS@
-lib_a_OBJECTS = libcfunc.o trap.o
+lib_a_OBJECTS = aeabi_atexit.o
CFLAGS = @CFLAGS@
COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
@@ -325,7 +325,7 @@ mostlyclean-generic distclean-generic clean-generic \
maintainer-clean-generic clean mostlyclean distclean maintainer-clean
-all: crt0.o
+@MAY_SUPPLY_SYSCALLS_TRUE@all: crt0.o
# 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.
diff --git a/newlib/libc/sys/arm/aeabi_atexit.c b/newlib/libc/sys/arm/aeabi_atexit.c
new file mode 100644
index 000000000..4b600e250
--- /dev/null
+++ b/newlib/libc/sys/arm/aeabi_atexit.c
@@ -0,0 +1,10 @@
+#include <stdlib.h>
+
+/* Register a function to be called by exit or when a shared library
+ is unloaded. This routine is like __cxa_atexit, but uses the
+ calling sequence required by the ARM EABI. */
+int
+__aeabi_atexit (void *arg, void (*func) (void *), void *d)
+{
+ return __cxa_atexit (func, arg, d);
+}
diff --git a/newlib/libc/sys/configure b/newlib/libc/sys/configure
index 9f389dbb2..7013ea4ea 100755
--- a/newlib/libc/sys/configure
+++ b/newlib/libc/sys/configure
@@ -2993,7 +2993,7 @@ if test -n "${sys_dir}"; then
fi
CRT0=
-if test -n "${sys_dir}"; then
+if test "x${have_crt0}" = "xyes"; then
CRT0=crt0.o
fi
diff --git a/newlib/libc/sys/configure.in b/newlib/libc/sys/configure.in
index 4a53612e0..895bdb2a2 100644
--- a/newlib/libc/sys/configure.in
+++ b/newlib/libc/sys/configure.in
@@ -22,7 +22,7 @@ if test -n "${sys_dir}"; then
fi
CRT0=
-if test -n "${sys_dir}"; then
+if test "x${have_crt0}" = "xyes"; then
CRT0=crt0.o
fi
AC_SUBST(CRT0)