]> gcc.gnu.org Git - gcc.git/commitdiff
re PR bootstrap/19364 (embedded sparc does not bootstrap)
authorEric Botcazou <ebotcazou@libertysurf.fr>
Mon, 24 Jan 2005 21:31:52 +0000 (22:31 +0100)
committerEric Botcazou <ebotcazou@gcc.gnu.org>
Mon, 24 Jan 2005 21:31:52 +0000 (21:31 +0000)
PR bootstrap/19364
* config.gcc (sparc-*-elf*): Remove sol2.h, sparc/sol2.h and
sparc/elf.h, add sparc/sp-elf.h.
(sparc-*-rtems*): Likewise.
(sparclite-*-elf*): Remove sol2.h, sparc/sol2.h, sparc/elf.h and
tm-dwarf2.h, add sparc/sp-elf.h.
(sparc86x-*-elf): Likewise.
(sparc64-*-elf*): Remove sol2.h, sparc/sol2.h and tm-dwarf2.h.
* config/sparc/liteelf.h (TARGET_SUB_OS_CPP_BUILTINS): Rename into
TARGET_OS_CPP_BUILTINS.
* config/sparc/sp86x-elf (TARGET_SUB_OS_CPP_BUILTINS): Likewise.
* config/sparc/rtemself.h (TARGET_SUB_OS_CPP_BUILTINS): Likewise.
Undefine it.
* config/sparc/openbsd64.h (NO_IMPLICIT_EXTERN_C): Undefine.
* config/sparc/sp64-elf.h (NO_IMPLICIT_EXTERN_C): New macro.
(SWITCH_TAKES_ARG): Likewise.
(LOCAL_LABEL_PREFIX): Likewise.
(ASM_GENERATE_INTERNAL_LABEL): Likewise.
(TARGET_N_FORMAT_TYPES): Delete.
(TARGET_FORMAT_TYPES): Likewise.
(ASM_DECLARE_FUNCTION_SIZE): Likewise.
* config/sparc/elf.h: Delete.
* config/sparc/sp-elf.h: New file.

From-SVN: r94185

gcc/ChangeLog
gcc/config.gcc
gcc/config/sparc/elf.h [deleted file]
gcc/config/sparc/liteelf.h
gcc/config/sparc/openbsd64.h
gcc/config/sparc/rtemself.h
gcc/config/sparc/sp-elf.h [new file with mode: 0644]
gcc/config/sparc/sp64-elf.h
gcc/config/sparc/sp86x-elf.h

index b701448bb2490e0a2946ab7ee68d52ad0b23ac8c..62ae65354a6876abbadcaaea795cb1aa14626ca3 100644 (file)
@@ -1,3 +1,29 @@
+2005-01-24  Eric Botcazou  <ebotcazou@libertysurf.fr>
+
+       PR bootstrap/19364
+       * config.gcc (sparc-*-elf*): Remove sol2.h, sparc/sol2.h and
+       sparc/elf.h, add sparc/sp-elf.h.
+       (sparc-*-rtems*): Likewise.
+       (sparclite-*-elf*): Remove sol2.h, sparc/sol2.h, sparc/elf.h and
+       tm-dwarf2.h, add sparc/sp-elf.h.
+       (sparc86x-*-elf): Likewise.
+       (sparc64-*-elf*): Remove sol2.h, sparc/sol2.h and tm-dwarf2.h.
+       * config/sparc/liteelf.h (TARGET_SUB_OS_CPP_BUILTINS): Rename into
+       TARGET_OS_CPP_BUILTINS.
+       * config/sparc/sp86x-elf (TARGET_SUB_OS_CPP_BUILTINS): Likewise.
+       * config/sparc/rtemself.h (TARGET_SUB_OS_CPP_BUILTINS): Likewise.
+       Undefine it.
+       * config/sparc/openbsd64.h (NO_IMPLICIT_EXTERN_C): Undefine.
+       * config/sparc/sp64-elf.h (NO_IMPLICIT_EXTERN_C): New macro.
+       (SWITCH_TAKES_ARG): Likewise.
+       (LOCAL_LABEL_PREFIX): Likewise.
+       (ASM_GENERATE_INTERNAL_LABEL): Likewise.
+       (TARGET_N_FORMAT_TYPES): Delete.
+       (TARGET_FORMAT_TYPES): Likewise.
+       (ASM_DECLARE_FUNCTION_SIZE): Likewise.
+       * config/sparc/elf.h: Delete.
+       * config/sparc/sp-elf.h: New file.
+
 2005-01-24  Kazu Hirata  <kazu@cs.umass.edu>
 
        * tree-flow-inline.h (phi_arg_from_edge): Remove.
index 462593a50cd988cedb105b526865a62f2281e7a4..c56b1da8a3cad3d2c834f078f96d9edc183decc8 100644 (file)
@@ -1889,7 +1889,7 @@ sparc64-*-openbsd*)
        with_cpu=ultrasparc
        ;;
 sparc-*-elf*)
-       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h"
+       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h"
        tmake_file="sparc/t-elf sparc/t-crtfm"
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
        use_fixproto=yes
@@ -1899,7 +1899,7 @@ sparc-*-linux*)           # SPARC's running GNU/Linux, libc6
        tmake_file="${tmake_file} sparc/t-crtfm"
        ;;
 sparc-*-rtems*)
-       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h"
+       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h"
        tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
        extra_parts="crti.o crtn.o crtbegin.o crtend.o"
        ;;
@@ -1997,19 +1997,19 @@ sparclite-*-coff*)
        tmake_file=sparc/t-sparclite
        ;;
 sparclite-*-elf*)
-       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/liteelf.h tm-dwarf2.h"
+       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/liteelf.h"
        tmake_file="sparc/t-sparclite sparc/t-crtfm"
         extra_parts="crtbegin.o crtend.o"
        use_fixproto=yes
        ;;
 sparc86x-*-elf*)
-       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/sp86x-elf.h tm-dwarf2.h"
+       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp-elf.h sparc/sp86x-elf.h"
        tmake_file="sparc/t-sp86x sparc/t-crtfm"
         extra_parts="crtbegin.o crtend.o"
        use_fixproto=yes
        ;;
 sparc64-*-elf*)
-       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/sp64-elf.h tm-dwarf2.h"
+       tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sparc/sp64-elf.h"
        tmake_file="${tmake_file} sparc/t-crtfm"
        extra_parts="crtbegin.o crtend.o"
        use_fixproto=yes
diff --git a/gcc/config/sparc/elf.h b/gcc/config/sparc/elf.h
deleted file mode 100644 (file)
index 5d55c9c..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* Definitions of target machine for GCC,
-   for SPARC running in an embedded environment using the ELF file format.
-   Copyright (C) 1997, 2004 Free Software Foundation, Inc.
-
-This file is part of GCC.
-
-GCC 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.
-
-GCC 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 GCC; see the file COPYING.  If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA.  */
-
-#undef STARTFILE_SPEC
-#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
-
-#undef  ENDFILE_SPEC
-#define ENDFILE_SPEC \
-  "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
-   crtend.o%s crtn.o%s"
-
-/* Use the default.  */
-#undef LINK_SPEC
-
-/* Don't set the target flags, this is done by the linker script */
-#undef LIB_SPEC
-#define LIB_SPEC ""
-
-/* FIXME: until fixed */
-#undef LONG_DOUBLE_TYPE_SIZE
-#define LONG_DOUBLE_TYPE_SIZE 64
-
-/* This solaris2 define does not apply.  */
-#undef STDC_0_IN_SYSTEM_HEADERS
-
-/* We don't want to use the Solaris2 specific long long int conversion
-   routines or 64-bit integer multiply and divide routines.  */
-#undef SUN_CONVERSION_LIBFUNCS
-#define SUN_CONVERSION_LIBFUNCS 0
-
-#undef SUN_INTEGER_MULTIPLY_64
-#define SUN_INTEGER_MULTIPLY_64 0
-
-/* Don't include Solaris-specific format checks.  */
-#undef TARGET_N_FORMAT_TYPES
-#undef TARGET_FORMAT_TYPES
-
-/* Don't include Solaris-specific .init / .fini support.  */
-#undef ASM_DECLARE_FUNCTION_SIZE
-#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)           \
-  do                                                           \
-    {                                                          \
-      if (!flag_inhibit_size_directive)                                \
-       ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME);                 \
-    }                                                          \
-  while (0)
index 00318576bad9fe064a5c7d31ffade981c8ac126b..584816b4a1e1a75d4133ec99b2c3251ec1f6c74a 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GCC, for SPARClite w/o FPU, ELF.
-   Copyright (C) 1998, 1999 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2005 Free Software Foundation, Inc.
    Contributed by Stan Cox (scox@cygnus.com).
 
 This file is part of GCC.
@@ -19,17 +19,17 @@ along with GCC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#undef TARGET_SUB_OS_CPP_BUILTINS
-#define TARGET_SUB_OS_CPP_BUILTINS()           \
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparclite)");
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()               \
   do                                           \
     {                                          \
        builtin_define ("__sparclite__");       \
     }                                          \
   while (0)
 
-#undef TARGET_VERSION
-#define TARGET_VERSION fprintf (stderr, " (sparclite)");
-
 /* Enable app-regs and epilogue options.  Do not enable the fpu.  */
 
 #undef TARGET_DEFAULT
index e13c8862554b9530428e8feee497dacc0ff41bec..4801525a8bc1b39fdfdc52ce1333fa086b8cb8ee 100644 (file)
@@ -1,5 +1,5 @@
 /* Configuration file for sparc64 OpenBSD target.
-   Copyright (C) 1999 Free Software Foundation, Inc.
+   Copyright (C) 1999, 2005 Free Software Foundation, Inc.
 
 This file is part of GCC.
 
@@ -51,6 +51,9 @@ Boston, MA 02111-1307, USA.  */
 #undef MD_EXEC_PREFIX
 #undef MD_STARTFILE_PREFIX
 
+/* Inherited from sp64-elf.  */
+#undef NO_IMPLICIT_EXTERN_C
+
 #undef ASM_SPEC
 #define ASM_SPEC "\
 %{v:-V} -s %{fpic|fPIC|fpie|fPIE:-K PIC} \
index bd9eea45532dc06f0373e547329fd9594dd4a00f..b55680d7cf793056c956c1e5cced679c214fdd88 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions for rtems targeting a SPARC using ELF.
-   Copyright (C) 1996, 1997, 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 1996, 1997, 2000, 2002, 2005 Free Software Foundation, Inc.
    Contributed by Joel Sherrill (joel@OARcorp.com).
 
 This file is part of GCC.
@@ -20,7 +20,8 @@ the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
 /* Target OS builtins.  */
-#define TARGET_SUB_OS_CPP_BUILTINS()           \
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()               \
   do                                           \
     {                                          \
        builtin_define ("__rtems__");           \
diff --git a/gcc/config/sparc/sp-elf.h b/gcc/config/sparc/sp-elf.h
new file mode 100644 (file)
index 0000000..b261299
--- /dev/null
@@ -0,0 +1,83 @@
+/* Definitions of target machine for GCC,
+   for SPARC running in an embedded environment using the ELF file format.
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC 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.
+
+GCC 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 GCC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparc-elf)")
+
+#undef TARGET_DEFAULT
+#define TARGET_DEFAULT MASK_FPU
+
+/* Don't assume anything about the header files.  */
+#define NO_IMPLICIT_EXTERN_C
+
+/* The sun bundled assembler doesn't accept -Yd, (and neither does gas).
+   It's safe to pass -s always, even if -g is not used.  */
+#undef ASM_SPEC
+#define ASM_SPEC \
+  "%{v:-V} %{Qy:} %{!Qn:-Qy} %{n} %{T} %{Ym,*} %{Wa,*:%*} -s \
+   %{fpic|fpie|fPIC|fPIE:-K PIC} %(asm_cpu)"
+
+/* Use the default.  */
+#undef LINK_SPEC
+
+#undef STARTFILE_SPEC
+#define STARTFILE_SPEC "crt0.o%s crti.o%s crtbegin.o%s"
+
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+  "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
+   crtend.o%s crtn.o%s"
+
+/* Don't set the target flags, this is done by the linker script */
+#undef LIB_SPEC
+#define LIB_SPEC ""
+
+/* This defines which switch letters take arguments.
+   It is as in svr4.h but with -R added.  */
+#undef SWITCH_TAKES_ARG
+#define SWITCH_TAKES_ARG(CHAR) \
+  (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
+   || (CHAR) == 'R' \
+   || (CHAR) == 'h' \
+   || (CHAR) == 'z')
+\f
+#undef  LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX  "."
+
+/* This is how to store into the string LABEL
+   the symbol_ref name of an internal numbered label where
+   PREFIX is the class of label and NUM is the number within the class.
+   This is suitable for output with `assemble_name'.  */
+
+#undef  ASM_GENERATE_INTERNAL_LABEL
+#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
+  sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
+\f
+/* ??? Inherited from sol2.h.  Probably wrong.  */
+#undef WCHAR_TYPE
+#define WCHAR_TYPE "long int"
+
+#undef WCHAR_TYPE_SIZE
+#define WCHAR_TYPE_SIZE BITS_PER_WORD
+
+/* ??? until fixed.  */
+#undef LONG_DOUBLE_TYPE_SIZE
+#define LONG_DOUBLE_TYPE_SIZE 64
index bbee49df8c97ada171883704620bee9e45f6514e..e75a5f53bf65d1e5b00b4f99b663a44836d37f75 100644 (file)
@@ -20,16 +20,10 @@ along with GCC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-/* ??? We're taking the scheme of including another file and then overriding
-   the values we don't like a bit too far here.  The alternative is to more or
-   less duplicate all of svr4.h, sparc/sysv4.h, and sparc/sol2.h here
-   (suitably cleaned up).  */
-
 #undef TARGET_VERSION
 #define TARGET_VERSION fprintf (stderr, " (sparc64-elf)")
 
 /* A 64 bit v9 compiler in a Medium/Anywhere code model environment.  */
-
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT \
 (MASK_V9 + MASK_PTR64 + MASK_64BIT + MASK_HARD_QUAD \
@@ -38,6 +32,9 @@ Boston, MA 02111-1307, USA.  */
 #undef SPARC_DEFAULT_CMODEL
 #define SPARC_DEFAULT_CMODEL CM_EMBMEDANY
 
+/* Don't assume anything about the header files.  */
+#define NO_IMPLICIT_EXTERN_C
+
 /* __svr4__ is used by the C library (FIXME) */
 #undef CPP_SUBTARGET_SPEC
 #define CPP_SUBTARGET_SPEC "-D__svr4__"
@@ -75,6 +72,15 @@ crtbegin.o%s \
 /* Use the default (for now).  */
 #undef LIB_SPEC
 
+/* This defines which switch letters take arguments.
+   It is as in svr4.h but with -R added.  */
+#undef SWITCH_TAKES_ARG
+#define SWITCH_TAKES_ARG(CHAR) \
+  (DEFAULT_SWITCH_TAKES_ARG(CHAR) \
+   || (CHAR) == 'R' \
+   || (CHAR) == 'h' \
+   || (CHAR) == 'z')
+
 /* V9 chips can handle either endianness.  */
 #undef SUBTARGET_SWITCHES
 #define SUBTARGET_SWITCHES \
@@ -86,7 +92,19 @@ crtbegin.o%s \
 
 #undef WORDS_BIG_ENDIAN
 #define WORDS_BIG_ENDIAN (! TARGET_LITTLE_ENDIAN)
-
+\f
+#undef  LOCAL_LABEL_PREFIX
+#define LOCAL_LABEL_PREFIX  "."
+
+/* This is how to store into the string LABEL
+   the symbol_ref name of an internal numbered label where
+   PREFIX is the class of label and NUM is the number within the class.
+   This is suitable for output with `assemble_name'.  */
+
+#undef  ASM_GENERATE_INTERNAL_LABEL
+#define ASM_GENERATE_INTERNAL_LABEL(LABEL,PREFIX,NUM)  \
+  sprintf ((LABEL), "*.L%s%ld", (PREFIX), (long)(NUM))
+\f
 /* ??? This should be 32 bits for v9 but what can we do?  */
 #undef WCHAR_TYPE
 #define WCHAR_TYPE "short unsigned int"
@@ -104,17 +122,3 @@ crtbegin.o%s \
    this 0 to not confuse the branch shortening code.  */
 #undef JUMP_TABLES_IN_TEXT_SECTION
 #define JUMP_TABLES_IN_TEXT_SECTION 0
-
-/* Don't include Solaris-specific format checks.  */
-#undef TARGET_N_FORMAT_TYPES
-#undef TARGET_FORMAT_TYPES
-
-/* Don't include Solaris-specific .init / .fini support.  */
-#undef ASM_DECLARE_FUNCTION_SIZE
-#define ASM_DECLARE_FUNCTION_SIZE(FILE, FNAME, DECL)           \
-  do                                                           \
-    {                                                          \
-      if (!flag_inhibit_size_directive)                                \
-       ASM_OUTPUT_MEASURED_SIZE (FILE, FNAME);                 \
-    }                                                          \
-  while (0)
index 8aa84301019fd5fe65fe2762c7b7fc03fcb90c0b..971f3583b7fae3e221c5a2ab81a82f15b137671e 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of target machine for GCC, for sparclite 86x w/o FPU.
-   Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc.
+   Copyright (C) 1998, 1999, 2000, 2005 Free Software Foundation, Inc.
    Contributed by Stan Cox (scox@cygnus.com).
 
 This file is part of GCC.
@@ -19,17 +19,17 @@ along with GCC; see the file COPYING.  If not, write to
 the Free Software Foundation, 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.  */
 
-#undef  TARGET_SUB_OS_CPP_BUILTINS
-#define TARGET_SUB_OS_CPP_BUILTINS()           \
+#undef TARGET_VERSION
+#define TARGET_VERSION fprintf (stderr, " (sparclite 86x)");
+
+#undef TARGET_OS_CPP_BUILTINS
+#define TARGET_OS_CPP_BUILTINS()               \
   do                                           \
     {                                          \
        builtin_define ("__sparclite86x__");    \
     }                                          \
   while (0)
 
-#undef TARGET_VERSION
-#define TARGET_VERSION fprintf (stderr, " (sparclite 86x)");
-
 /* Enable app-regs and epilogue options.  Do not enable the fpu.  */
 
 #undef TARGET_DEFAULT
This page took 0.086026 seconds and 5 git commands to generate.