This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFA: Remove ARM syscall support from newlib


Hi Guys,

  The directory newlib/libc/sys/arm contains some obsolete code for ARM
  syscall support.  The proper ARM syscall code is now in libgloss.  So
  I am proposing the patch below.  It removes the syscall support files
  and instead replaces them with a README-syscalls file which explains
  where to find the current syscall support code.

  Does anyone have any objections to my applying this patch ?
  
Cheers
  Nick

newlib/ChangeLog
2011-07-27  Nick Clifton  <nickc@redhat.com>

	* configure.host (arm-*-*): Always set have_crt0="no".
	Remove definition of syscall_dir.
	* libc/sys/arm/REAME-syscalls: New file - mention that ARM syscall
	support is now in libgloss/arm.
	* libc/sys/arm/configure.in (AC_CONFIG_SRCDIR): Depend upon
	aeabi_atexit.c.
	* libc/sys/arm/configure: Regenerate.
	* libc/sys/arm/Makefile.am (extra_objs): Delete.
	(lib_a_LIBADD, EXTRA_lib_a_SOURCES): Delete.
	* libc/sys/arm/Makefile.in: Regenerate.
	* libc/sys/arm/crt0.S: Delete.
	* libc/sys/arm/libcfunc.c: Delete.
	* libc/sys/arm/swi.h: Delete.
	* libc/sys/arm/syscalls.c: Delete.
	* libc/sys/arm/trap.S: Delete.

Index: newlib/configure.host
===================================================================
RCS file: /cvs/src/src/newlib/configure.host,v
retrieving revision 1.121
diff -u -3 -p -r1.121 configure.host
--- newlib/configure.host	14 Jun 2011 13:40:47 -0000	1.121
+++ newlib/configure.host	26 Jul 2011 15:31:29 -0000
@@ -362,9 +362,7 @@ case "${host}" in
 	;;
   arm-*-*)
 	sys_dir=arm
-	if [ "x${newlib_may_supply_syscalls}" = "xno" ] ; then
-	  have_crt0="no"
-	fi
+	have_crt0="no"
 	;;
   bfin-*-*)
 	sys_dir=
@@ -548,22 +546,10 @@ case "${host}" in
   arc-*-*)
 	syscall_dir=syscalls
 	;;
-  arm-*-pe)
-	syscall_dir=syscalls
-	;;
   arm-*-*)
-	syscall_dir=syscalls
-# If newlib is supplying syscalls, select which debug protocol is being used.
-# ARM_RDP_MONITOR selects the Demon monitor.
-# ARM_RDI_MONITOR selects the Angel monitor.
-# If neither are defined, then hard coded defaults will be used
-# to create the program's environment.
-# If --disable-newlib-supplied-syscalls is specified, then the end-user
-# may specify the protocol via gcc spec files supplied by libgloss.
-	if [ "x${newlib_may_supply_syscalls}" = "xyes" ] ; then
-#         newlib_cflags="${newlib_cflags} -DARM_RDP_MONITOR"
-	  newlib_cflags="${newlib_cflags} -DARM_RDI_MONITOR"
-	fi
+	# syscall_dir is not set.  ARM syscall support is now handled
+	# by libgloss.  FIXME:  If newlib_may_supply_syscalls is set
+	# then maybe we should issue a warning message ?
 	;;
   arc*)
 	newlib_cflags="${newlib_cflags} -DREENTRANT_SYSCALLS_PROVIDED"
Index: newlib/libc/sys/arm/Makefile.am
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/arm/Makefile.am,v
retrieving revision 1.9
diff -u -3 -p -r1.9 Makefile.am
--- newlib/libc/sys/arm/Makefile.am	19 Aug 2009 20:04:43 -0000	1.9
+++ newlib/libc/sys/arm/Makefile.am	26 Jul 2011 15:31:30 -0000
@@ -8,22 +8,9 @@ AM_CCASFLAGS = $(INCLUDES)
 
 noinst_LIBRARIES = lib.a
 
-if MAY_SUPPLY_SYSCALLS
-extra_objs = $(lpfx)libcfunc.o $(lpfx)trap.o $(lpfx)syscalls.o
-else
-extra_objs =
-endif
-
 lib_a_SOURCES = 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_CCASFLAGS = $(AM_CCASFLAGS)
 lib_a_CFLAGS = $(AM_CFLAGS)
 
-if MAY_SUPPLY_SYSCALLS
-all-local: crt0.o
-endif
-
 ACLOCAL_AMFLAGS = -I ../../.. -I ../../../..
 CONFIG_STATUS_DEPENDENCIES = $(newlib_basedir)/configure.host
Index: newlib/libc/sys/arm/configure.in
===================================================================
RCS file: /cvs/src/src/newlib/libc/sys/arm/configure.in,v
retrieving revision 1.2
diff -u -3 -p -r1.2 configure.in
--- newlib/libc/sys/arm/configure.in	13 Apr 2006 19:56:27 -0000	1.2
+++ newlib/libc/sys/arm/configure.in	26 Jul 2011 15:31:31 -0000
@@ -3,7 +3,7 @@ dnl Process this file with autoconf to p
 
 AC_PREREQ(2.59)
 AC_INIT([newlib],[NEWLIB_VERSION])
-AC_CONFIG_SRCDIR([trap.S])
+AC_CONFIG_SRCDIR([aeabi_atexit.c])
 
 dnl Can't be done in NEWLIB_CONFIGURE because that confuses automake. 
 AC_CONFIG_AUX_DIR(../../../..)
*** /dev/null	2011-07-26 08:16:18.895000001 +0100
--- newlib/libc/sys/arm/README-syscalls	2011-07-26 16:34:35.517594001 +0100
***************
*** 0 ****
--- 1,2 ----
+ ARM syscall support has been moved from here to the libgloss/arm
+ directory.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]