This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH] remove arm/unknown-elf.h


Every consumer of arm/unknown-elf.h immediately includes arm/elf.h (via
tm_files).  There are no consumers of arm/unknown-elf.h only.
Thus arm/unknown-elf.h can be folded into arm/elf.h.

2001-12-05  David O'Brien  <obrien@FreeBSD.org>

	* config.gcc: Do not include arm/unknown-elf.h, file removed (merged
	with arm/elf.h).
	* arm/elf.h (STARTFILE_SPEC, ENDFILE_SPEC, PREFERRED_DEBUGGING_TYPE,
	CPP_APCS_PC_DEFAULT_SPEC, SUBTARGET_CPU_DEFAULT, IN_NAMED_SECTION,
	ASM_OUTPUT_ALIGNED_BSS, ASM_OUTPUT_ALIGNED_DECL_LOCAL): Define.
	(SUBTARGET_CPP_SPEC): Add -D__USES_INITFINI__.
	* arm/unknown-elf.h (STARTFILE_SPEC, ENDFILE_SPEC,
	PREFERRED_DEBUGGING_TYPE, CPP_APCS_PC_DEFAULT_SPEC,
	SUBTARGET_CPU_DEFAULT, IN_NAMED_SECTION, ASM_OUTPUT_ALIGNED_BSS,
	ASM_OUTPUT_ALIGNED_DECL_LOCAL): Remove (moved to arm/elf.h).



Index: config.gcc
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config.gcc,v
retrieving revision 1.123
diff -u -r1.123 config.gcc
--- config.gcc	2001/12/05 21:19:14	1.123
+++ config.gcc	2001/12/05 23:55:12
@@ -531,7 +531,7 @@
 	extra_parts="crtinit.o crtfini.o"
 	;;
 arm*-*-rtems*)
-	tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
+	tm_file="elfos.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
 	tmake_file="arm/t-arm-elf t-rtems"
 	if test x$enable_threads = xyes; then
 	  thread_file='rtems'
@@ -574,7 +574,7 @@
 	use_collect2=yes
 	;;
 arm*-*-linux*)			# ARM GNU/Linux with ELF
-	tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
+	tm_file="elfos.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h"
 	tmake_file="t-slibgcc-elf-ver t-linux arm/t-linux"
 	extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
 	gnu_ld=yes
@@ -585,7 +585,7 @@
 	esac
 	;;
 arm*-*-uclinux*)		# ARM ucLinux
-	tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h arm/uclinux-elf.h"
+	tm_file="elfos.h arm/elf.h arm/aout.h arm/arm.h arm/linux-gas.h arm/linux-elf.h arm/uclinux-elf.h"
 	tmake_file=arm/t-arm-elf
 	;;
 arm*-*-aout)
@@ -593,19 +593,19 @@
 	tmake_file=arm/t-arm-aout
 	;;
 arm*-*-ecos-elf)
-	tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
+	tm_file="elfos.h arm/elf.h arm/aout.h arm/arm.h arm/ecos-elf.h"
 	tmake_file=arm/t-arm-elf
 	;;
 arm*-*-elf)
-	tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
+	tm_file="elfos.h arm/elf.h arm/aout.h arm/arm.h"
 	tmake_file=arm/t-arm-elf
 	;;
 arm*-*-conix*)
-	tm_file="elfos.h arm/unknown-elf.h arm/elf.h arm/conix-elf.h arm/aout.h arm/arm.h"
+	tm_file="elfos.h arm/elf.h arm/conix-elf.h arm/aout.h arm/arm.h"
 	tmake_file=arm/t-arm-elf
 	;;
 arm*-*-oabi)
-	tm_file="arm/unknown-elf-oabi.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
+	tm_file="arm/unknown-elf-oabi.h elfos.h arm/elf.h arm/aout.h arm/arm.h"
 	tmake_file=arm/t-arm-elf
 	;;
 arm-*-pe*)
@@ -3139,7 +3139,7 @@
 	float_format=sparc
 	;;
 strongarm-*-elf*)
-	tm_file="arm/strongarm-elf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
+	tm_file="arm/strongarm-elf.h elfos.h arm/elf.h arm/aout.h arm/arm.h"
 	tmake_file=arm/t-strongarm-elf
 	out_file=arm/arm.c
 	md_file=arm/arm.md
@@ -3223,7 +3223,7 @@
 	use_collect2=yes
 	;;
 xscale-*-elf)
-	tm_file="arm/xscale-elf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h"
+	tm_file="arm/xscale-elf.h elfos.h arm/elf.h arm/aout.h arm/arm.h"
 	tmake_file=arm/t-xscale-elf
 	out_file=arm/arm.c
 	md_file=arm/arm.md
Index: config/arm/elf.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/elf.h,v
retrieving revision 1.31
diff -u -r1.31 elf.h
--- elf.h	2001/11/16 21:23:16	1.31
+++ elf.h	2001/12/05 23:55:12
@@ -26,14 +26,35 @@
  #error elf.h included before elfos.h
 #endif
 
+/* Now we define the strings used to build the spec file.  */
+/* XXX This should become an 'ifndef' rather than 'undef' once the polution
+   in elfos.h is fixed.  */
+#undef  STARTFILE_SPEC
+#define STARTFILE_SPEC	" crti%O%s crtbegin%O%s crt0%O%s"
+
+/* XXX This should become an 'ifndef' rather than 'undef' once the polution
+   in elfos.h is fixed.  */
+#undef  ENDFILE_SPEC
+#define ENDFILE_SPEC	"crtend%O%s crtn%O%s"
+
+/* XXX This should become an 'ifndef' rather than 'undef' once the polution
+   in elfos.h is fixed.  */
+#undef  PREFERRED_DEBUGGING_TYPE
+#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
+
 #ifndef LOCAL_LABEL_PREFIX
 #define LOCAL_LABEL_PREFIX "."
 #endif
 
-#ifndef SUBTARGET_CPP_SPEC
-#define SUBTARGET_CPP_SPEC  "-D__ELF__"
+#ifndef CPP_APCS_PC_DEFAULT_SPEC
+#define CPP_APCS_PC_DEFAULT_SPEC	"-D__APCS_32__"
 #endif
 
+/* The __USES_INITFINI__ define is tested in newlib/libc/sys/arm/crt0.S
+   to see if it needs to invoked _init() and _fini().  */
+#undef  SUBTARGET_CPP_SPEC
+#define SUBTARGET_CPP_SPEC  "-D__ELF__ -D__USES_INITFINI__"
+
 #ifndef SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS \
   { "subtarget_extra_asm_spec",	SUBTARGET_EXTRA_ASM_SPEC },
@@ -108,12 +129,17 @@
 #ifndef LINK_SPEC
 #define LINK_SPEC "%{mbig-endian:-EB} -X"
 #endif
-  
+
 /* Run-time Target Specification.  */
 #ifndef TARGET_VERSION
 #define TARGET_VERSION fputs (" (ARM/elf)", stderr)
 #endif
 
+#ifndef SUBTARGET_CPU_DEFAULT
+#define SUBTARGET_CPU_DEFAULT 		TARGET_CPU_arm7tdmi
+#endif
+
+/* Default to using APCS-32 and software floating point.  */
 #ifndef TARGET_DEFAULT
 #define TARGET_DEFAULT (ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME)
 #endif
@@ -192,4 +218,43 @@
       if ((POWER) > 0)					\
 	fprintf (STREAM, "\t.align\t%d\n", POWER);	\
     }							\
+  while (0)
+
+/* Return a non-zero value if DECL has a section attribute.  */
+#define IN_NAMED_SECTION(DECL)						\
+  ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL)	\
+   && DECL_SECTION_NAME (DECL) != NULL_TREE)
+
+#undef  ASM_OUTPUT_ALIGNED_BSS
+#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN)   	\
+  do									\
+    {									\
+      if (IN_NAMED_SECTION (DECL))					\
+	named_section (DECL, NULL, 0);					\
+      else								\
+	bss_section ();							\
+      									\
+      ASM_GLOBALIZE_LABEL (FILE, NAME);					\
+      									\
+      ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT));	\
+									\
+      last_assemble_variable_decl = DECL;				\
+      ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL);			\
+      ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1);				\
+    } 									\
+  while (0)
+
+#undef  ASM_OUTPUT_ALIGNED_DECL_LOCAL
+#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN)	\
+  do									\
+    {									\
+      if ((DECL) != NULL && IN_NAMED_SECTION (DECL))			\
+	named_section (DECL, NULL, 0);					\
+      else								\
+	bss_section ();							\
+									\
+      ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT));	\
+      ASM_OUTPUT_LABEL (FILE, NAME);					\
+      fprintf (FILE, "\t.space\t%d\n", SIZE);				\
+    }									\
   while (0)
Index: config/arm/unknown-elf.h
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/arm/unknown-elf.h,v
retrieving revision 1.23
diff -u -r1.23 unknown-elf.h
--- unknown-elf.h	2001/11/05 16:36:35	1.23
+++ unknown-elf.h	2001/12/05 23:55:12
@@ -1,96 +0,0 @@
-/* Definitions for non-Linux based ARM systems using ELF
-   Copyright (C) 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
-   Contributed by Catherine Moore <clm@cygnus.com>
-
-This file is part of GNU CC.
-
-GNU CC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GNU CC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with this program; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-/* elfos.h should have already been included.  Now just override
-   any conflicting definitions and add any extras.  */
-
-/* Run-time Target Specification.  */
-#ifndef TARGET_VERSION
-#define TARGET_VERSION	fputs (" (ARM/ELF non-Linux)", stderr);
-#endif
-
-/* Default to using APCS-32 and software floating point.  */
-#ifndef TARGET_DEFAULT
-#define TARGET_DEFAULT	(ARM_FLAG_SOFT_FLOAT | ARM_FLAG_APCS_32 | ARM_FLAG_APCS_FRAME)
-#endif
-
-/* Now we define the strings used to build the spec file.  */
-#undef  STARTFILE_SPEC
-#define STARTFILE_SPEC	" crti%O%s crtbegin%O%s crt0%O%s"
-
-#undef  ENDFILE_SPEC
-#define ENDFILE_SPEC	"crtend%O%s crtn%O%s"
-
-/* The __USES_INITFINI__ define is tested in newlib/libc/sys/arm/crt0.S
-   to see if it needs to invoked _init() and _fini().  */
-#undef  SUBTARGET_CPP_SPEC
-#define SUBTARGET_CPP_SPEC  "-D__ELF__ -D__USES_INITFINI__"
-
-#undef  PREFERRED_DEBUGGING_TYPE
-#define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
-/* Return a non-zero value if DECL has a section attribute.  */
-#define IN_NAMED_SECTION(DECL)						\
-  ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL)	\
-   && DECL_SECTION_NAME (DECL) != NULL_TREE)
-
-#undef  ASM_OUTPUT_ALIGNED_BSS
-#define ASM_OUTPUT_ALIGNED_BSS(FILE, DECL, NAME, SIZE, ALIGN)   	\
-  do									\
-    {									\
-      if (IN_NAMED_SECTION (DECL))					\
-	named_section (DECL, NULL, 0);					\
-      else								\
-	bss_section ();							\
-      									\
-      ASM_GLOBALIZE_LABEL (FILE, NAME);					\
-      									\
-      ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT));	\
-									\
-      last_assemble_variable_decl = DECL;				\
-      ASM_DECLARE_OBJECT_NAME (FILE, NAME, DECL);			\
-      ASM_OUTPUT_SKIP (FILE, SIZE ? SIZE : 1);				\
-    } 									\
-  while (0)
-
-#undef  ASM_OUTPUT_ALIGNED_DECL_LOCAL
-#define ASM_OUTPUT_ALIGNED_DECL_LOCAL(FILE, DECL, NAME, SIZE, ALIGN)	\
-  do									\
-    {									\
-      if ((DECL) != NULL && IN_NAMED_SECTION (DECL))			\
-	named_section (DECL, NULL, 0);					\
-      else								\
-	bss_section ();							\
-									\
-      ASM_OUTPUT_ALIGN (FILE, floor_log2 (ALIGN / BITS_PER_UNIT));	\
-      ASM_OUTPUT_LABEL (FILE, NAME);					\
-      fprintf (FILE, "\t.space\t%d\n", SIZE);				\
-    }									\
-  while (0)
-
-#ifndef CPP_APCS_PC_DEFAULT_SPEC
-#define CPP_APCS_PC_DEFAULT_SPEC	"-D__APCS_32__"
-#endif
-     
-#ifndef SUBTARGET_CPU_DEFAULT
-#define SUBTARGET_CPU_DEFAULT 		TARGET_CPU_arm7tdmi
-#endif
-


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