]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Better integrate default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR'
authorThomas Schwinge <thomas@codesourcery.com>
Thu, 3 Nov 2022 16:29:13 +0000 (17:29 +0100)
committerThomas Schwinge <thomas@codesourcery.com>
Fri, 4 Nov 2022 09:01:49 +0000 (10:01 +0100)
... after commit 4ee35c11fd328728c12f3e086ae016ca94624bf8
"Restore default 'sorry' 'TARGET_ASM_CONSTRUCTOR', 'TARGET_ASM_DESTRUCTOR'".
No functional change.

gcc/
* Makefile.in (OBJS): Remove 'dbxout.o'.
* config/nvptx/nvptx.cc: Don't '#include "dbxout.h"'.
* dbxout.cc: Remove.
* dbxout.h: Likewise.
* target-def.h (TARGET_ASM_CONSTRUCTOR, TARGET_ASM_DESTRUCTOR):
Default to 'default_asm_out_constructor',
'default_asm_out_destructor'.
* targhooks.cc (default_asm_out_constructor)
(default_asm_out_destructor): New.
* targhooks.h (default_asm_out_constructor)
(default_asm_out_destructor): Declare.

gcc/Makefile.in
gcc/config/nvptx/nvptx.cc
gcc/dbxout.cc [deleted file]
gcc/dbxout.h [deleted file]
gcc/target-def.h
gcc/targhooks.cc
gcc/targhooks.h

index c4072d06a936ffcfe5943f1348cc2ede0753822c..f672e6ea5498ceac781486f053238209326129e6 100644 (file)
@@ -1355,7 +1355,6 @@ OBJS = \
        data-streamer.o \
        data-streamer-in.o \
        data-streamer-out.o \
-       dbxout.o \
        dbgcnt.o \
        dce.o \
        ddg.o \
index 4cb5d02d40cd3be2b44b4e913c51216a7b543caa..2fe120b387303887f0f7e4643e1f62b427fed574 100644 (file)
@@ -52,7 +52,6 @@
 #include "tm-preds.h"
 #include "tm-constrs.h"
 #include "langhooks.h"
-#include "dbxout.h"
 #include "cfgrtl.h"
 #include "gimple.h"
 #include "stor-layout.h"
diff --git a/gcc/dbxout.cc b/gcc/dbxout.cc
deleted file mode 100644 (file)
index 161eeb1..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Copyright (C) 1987-2022 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 3, 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 COPYING3.  If not see
-<http://www.gnu.org/licenses/>.  */
-
-#include "config.h"
-#include "system.h"
-#include "coretypes.h"
-#include "diagnostic-core.h"
-#include "dbxout.h"
-
-/* Record an element in the table of global destructors.  SYMBOL is
-   a SYMBOL_REF of the function to be called; PRIORITY is a number
-   between 0 and MAX_INIT_PRIORITY.  */
-
-void
-default_stabs_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
-                                 int priority ATTRIBUTE_UNUSED)
-{
-  sorry ("global destructors not supported on this target");
-}
-
-/* Likewise for global constructors.  */
-
-void
-default_stabs_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED,
-                                  int priority ATTRIBUTE_UNUSED)
-{
-  sorry ("global constructors not supported on this target");
-}
diff --git a/gcc/dbxout.h b/gcc/dbxout.h
deleted file mode 100644 (file)
index ad0b538..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-/* Copyright (C) 1998-2022 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 3, 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 COPYING3.  If not see
-<http://www.gnu.org/licenses/>.  */
-
-#ifndef GCC_DBXOUT_H
-#define GCC_DBXOUT_H
-
-extern void default_stabs_asm_out_destructor (rtx, int);
-extern void default_stabs_asm_out_constructor (rtx, int);
-
-#endif /* GCC_DBXOUT_H */
index 1c4aa2963dc44107e703ba7c1fa71f07ffbd07bd..5e5cc3b767e1c46b134e9480a133c5e94f6aa833 100644 (file)
@@ -63,7 +63,7 @@
 #  ifdef TARGET_ASM_NAMED_SECTION
 #   define TARGET_ASM_CONSTRUCTOR default_named_section_asm_out_constructor
 #  else
-#   define TARGET_ASM_CONSTRUCTOR default_stabs_asm_out_constructor
+#   define TARGET_ASM_CONSTRUCTOR default_asm_out_constructor
 #  endif
 # endif
 #endif
@@ -75,7 +75,7 @@
 #  ifdef TARGET_ASM_NAMED_SECTION
 #   define TARGET_ASM_DESTRUCTOR default_named_section_asm_out_destructor
 #  else
-#   define TARGET_ASM_DESTRUCTOR default_stabs_asm_out_destructor
+#   define TARGET_ASM_DESTRUCTOR default_asm_out_destructor
 #  endif
 # endif
 #endif
index d17d393baedc16574ddecb86e868799a65736660..12a58456b399af81ef316cf4c23cf6dae7286b27 100644 (file)
@@ -1405,6 +1405,26 @@ default_generate_pic_addr_diff_vec (void)
   return flag_pic;
 }
 
+/* Record an element in the table of global constructors.  SYMBOL is
+   a SYMBOL_REF of the function to be called; PRIORITY is a number
+   between 0 and MAX_INIT_PRIORITY.  */
+
+void
+default_asm_out_constructor (rtx symbol ATTRIBUTE_UNUSED,
+                            int priority ATTRIBUTE_UNUSED)
+{
+  sorry ("global constructors not supported on this target");
+}
+
+/* Likewise for global destructors.  */
+
+void
+default_asm_out_destructor (rtx symbol ATTRIBUTE_UNUSED,
+                           int priority ATTRIBUTE_UNUSED)
+{
+  sorry ("global destructors not supported on this target");
+}
+
 /* By default, do no modification. */
 tree default_mangle_decl_assembler_name (tree decl ATTRIBUTE_UNUSED,
                                         tree id)
index ecce55ebe797cedc940620e8d89816973a045d49..a6a423c1abb4a95a87e3fd78d1af981ca44d0486 100644 (file)
@@ -178,6 +178,8 @@ extern void default_target_option_override (void);
 extern void hook_void_bitmap (bitmap);
 extern int default_reloc_rw_mask (void);
 extern bool default_generate_pic_addr_diff_vec (void);
+extern void default_asm_out_constructor (rtx, int);
+extern void default_asm_out_destructor (rtx, int);
 extern tree default_mangle_decl_assembler_name (tree, tree);
 extern tree default_emutls_var_fields (tree, tree *);
 extern tree default_emutls_var_init (tree, tree, tree);