]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/defaults.h
Update copyright years.
[thirdparty/gcc.git] / gcc / defaults.h
index 72d4fba11a629140b28d109b5a9a2c24b65a4ad1..71c6a69a251114f2c91b7ef2971c005246599f0a 100644 (file)
@@ -1,5 +1,5 @@
 /* Definitions of various defaults for tm.h macros.
-   Copyright (C) 1992-2019 Free Software Foundation, Inc.
+   Copyright (C) 1992-2024 Free Software Foundation, Inc.
    Contributed by Ron Guilmette (rfg@monkeys.com)
 
 This file is part of GCC.
@@ -61,36 +61,35 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #ifndef ASM_OUTPUT_ASCII
 #define ASM_OUTPUT_ASCII(MYFILE, MYSTRING, MYLENGTH) \
   do {                                                                       \
-    FILE *_hide_asm_out_file = (MYFILE);                                     \
+    FILE *_my_file = (MYFILE);                               \
     const unsigned char *_hide_p = (const unsigned char *) (MYSTRING);       \
     int _hide_thissize = (MYLENGTH);                                         \
     {                                                                        \
-      FILE *asm_out_file = _hide_asm_out_file;                               \
       const unsigned char *p = _hide_p;                                              \
       int thissize = _hide_thissize;                                         \
       int i;                                                                 \
-      fprintf (asm_out_file, "\t.ascii \"");                                 \
+      fprintf (_my_file, "\t.ascii \"");                                     \
                                                                              \
       for (i = 0; i < thissize; i++)                                         \
        {                                                                     \
          int c = p[i];                                                       \
          if (c == '\"' || c == '\\')                                         \
-           putc ('\\', asm_out_file);                                        \
+           putc ('\\', _my_file);                                            \
          if (ISPRINT (c))                                                    \
-           putc (c, asm_out_file);                                           \
+           putc (c, _my_file);                                               \
          else                                                                \
            {                                                                 \
-             fprintf (asm_out_file, "\\%o", c);                              \
+             fprintf (_my_file, "\\%o", c);                                  \
              /* After an octal-escape, if a digit follows,                   \
                 terminate one string constant and start another.             \
                 The VAX assembler fails to stop reading the escape           \
                 after three digits, so this is the only way we               \
                 can get it to parse the data properly.  */                   \
              if (i < thissize - 1 && ISDIGIT (p[i + 1]))                     \
-               fprintf (asm_out_file, "\"\n\t.ascii \"");                    \
+               fprintf (_my_file, "\"\n\t.ascii \"");                        \
          }                                                                   \
        }                                                                     \
-      fprintf (asm_out_file, "\"\n");                                        \
+      fprintf (_my_file, "\"\n");                                            \
     }                                                                        \
   }                                                                          \
   while (0)
@@ -286,6 +285,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #endif
 #endif
 
+/* This determines whether or not we support marking sections with
+   SHF_GNU_RETAIN flag.  Also require .init_array/.fini_array section
+   for constructors and destructors.  */
+#ifndef SUPPORTS_SHF_GNU_RETAIN
+#if HAVE_GAS_SHF_GNU_RETAIN && HAVE_INITFINI_ARRAY_SUPPORT
+#define SUPPORTS_SHF_GNU_RETAIN 1
+#else
+#define SUPPORTS_SHF_GNU_RETAIN 0
+#endif
+#endif
+
 /* This determines whether or not we support link-once semantics.  */
 #ifndef SUPPORTS_ONE_ONLY
 #ifdef MAKE_DECL_ONE_ONLY
@@ -419,17 +429,17 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #endif
 #endif
 
-/* How to renumber registers for dbx and gdb.  If not defined, assume
+/* How to renumber registers for gdb.  If not defined, assume
    no renumbering is necessary.  */
 
-#ifndef DBX_REGISTER_NUMBER
-#define DBX_REGISTER_NUMBER(REGNO) (REGNO)
+#ifndef DEBUGGER_REGNO
+#define DEBUGGER_REGNO(REGNO) (REGNO)
 #endif
 
 /* The mapping from gcc register number to DWARF 2 CFA column number.
    By default, we just provide columns for all registers.  */
 #ifndef DWARF_FRAME_REGNUM
-#define DWARF_FRAME_REGNUM(REG) DBX_REGISTER_NUMBER (REG)
+#define DWARF_FRAME_REGNUM(REG) DEBUGGER_REGNO (REG)
 #endif
 
 /* The mapping from dwarf CFA reg number to internal dwarf reg numbers.  */
@@ -790,15 +800,6 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define NEXT_OBJC_RUNTIME 0
 #endif
 
-/* Supply a default definition for PUSH_ARGS.  */
-#ifndef PUSH_ARGS
-#ifdef PUSH_ROUNDING
-#define PUSH_ARGS      !ACCUMULATE_OUTGOING_ARGS
-#else
-#define PUSH_ARGS      0
-#endif
-#endif
-
 /* Decide whether a function's arguments should be processed
    from first to last or from last to first.
 
@@ -809,7 +810,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 
 #ifndef PUSH_ARGS_REVERSED
 #if defined (STACK_GROWS_DOWNWARD) != defined (ARGS_GROW_DOWNWARD)
-#define PUSH_ARGS_REVERSED  PUSH_ARGS
+#define PUSH_ARGS_REVERSED targetm.calls.push_argument (0)
 #endif
 #endif
 
@@ -876,6 +877,16 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #endif
 #endif
 
+/* Indicate whether the target uses "target" attributes for function
+   multiversioning.  This is used to choose between the "target" and
+   "target_version" attributes when expanding a "target_clones" attribute, and
+   determine whether the "target" and "target_clones" attributes are mutually
+   exclusive.  */
+#ifndef TARGET_HAS_FMV_TARGET_ATTRIBUTE
+#define TARGET_HAS_FMV_TARGET_ATTRIBUTE 1
+#endif
+
+
 /* Select a format to encode pointers in exception handling data.  We
    prefer those that result in fewer dynamic relocations.  Assume no
    special support here and encode direct references.  */
@@ -898,33 +909,14 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define DEFAULT_GDB_EXTENSIONS 1
 #endif
 
-/* If more than one debugging type is supported, you must define
-   PREFERRED_DEBUGGING_TYPE to choose the default.  */
-
-#if 1 < (defined (DBX_DEBUGGING_INFO) \
-         + defined (DWARF2_DEBUGGING_INFO) + defined (XCOFF_DEBUGGING_INFO) \
-         + defined (VMS_DEBUGGING_INFO))
+/* Default to DWARF2_DEBUGGING_INFO.  Legacy targets can choose different
+   by defining PREFERRED_DEBUGGING_TYPE.  */
 #ifndef PREFERRED_DEBUGGING_TYPE
-#error You must define PREFERRED_DEBUGGING_TYPE
-#endif /* no PREFERRED_DEBUGGING_TYPE */
-
-/* If only one debugging format is supported, define PREFERRED_DEBUGGING_TYPE
-   here so other code needn't care.  */
-#elif defined DBX_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE DBX_DEBUG
-
-#elif defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
+#if defined DWARF2_DEBUGGING_INFO || defined DWARF2_LINENO_DEBUGGING_INFO
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
-#elif defined VMS_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE VMS_AND_DWARF2_DEBUG
-
-#elif defined XCOFF_DEBUGGING_INFO
-#define PREFERRED_DEBUGGING_TYPE XCOFF_DEBUG
-
 #else
-/* No debugging format is supported by this target.  */
-#define PREFERRED_DEBUGGING_TYPE NO_DEBUG
+#error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported
+#endif
 #endif
 
 #ifndef FLOAT_LIB_COMPARE_RETURNS_BOOL
@@ -1459,6 +1451,12 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define DWARF_GNAT_ENCODINGS_DEFAULT DWARF_GNAT_ENCODINGS_GDB
 #endif
 
+/* When generating dwarf info, the default standard version we'll honor
+   and advertise in absence of -gdwarf-<N> on the command line.  */
+#ifndef DWARF_VERSION_DEFAULT
+#define DWARF_VERSION_DEFAULT 5
+#endif
+
 #ifndef USED_FOR_TARGET
 /* Done this way to keep gengtype happy.  */
 #if BITS_PER_UNIT == 8