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 09/12] always define TARGET_PECOFF


From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-11-09  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* config/i386/i386.h (TARGET_PECOFF): Remove define.
	* defaults.h (TARGET_PECOFF): New default definition.
	* varasm.c (handle_vtv_comdat_section): Adjust.

gcc/cp/ChangeLog:

2015-11-09  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* vtable-class-hierarchy.c (vtv_generate_init_routine): Adjust.
---
 gcc/config/i386/i386.h          | 3 ---
 gcc/cp/vtable-class-hierarchy.c | 8 --------
 gcc/defaults.h                  | 4 ++++
 gcc/varasm.c                    | 6 +++---
 4 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/gcc/config/i386/i386.h b/gcc/config/i386/i386.h
index 3d5b2b2..829c3f4 100644
--- a/gcc/config/i386/i386.h
+++ b/gcc/config/i386/i386.h
@@ -595,9 +595,6 @@ extern tree x86_mfence;
 /* This is re-defined by cygming.h.  */
 #define TARGET_SEH 0
 
-/* This is re-defined by cygming.h.  */
-#define TARGET_PECOFF 0
-
 /* The default abi used by target.  */
 #define DEFAULT_ABI SYSV_ABI
 
diff --git a/gcc/cp/vtable-class-hierarchy.c b/gcc/cp/vtable-class-hierarchy.c
index d5c31e8..ab308fd 100644
--- a/gcc/cp/vtable-class-hierarchy.c
+++ b/gcc/cp/vtable-class-hierarchy.c
@@ -1183,11 +1183,7 @@ vtv_generate_init_routine (void)
       TREE_STATIC (vtv_fndecl) = 1;
       TREE_USED (vtv_fndecl) = 1;
       DECL_PRESERVE_P (vtv_fndecl) = 1;
-#if defined (TARGET_PECOFF)
       if (flag_vtable_verify == VTV_PREINIT_PRIORITY && !TARGET_PECOFF)
-#else
-      if (flag_vtable_verify == VTV_PREINIT_PRIORITY)
-#endif
         DECL_STATIC_CONSTRUCTOR (vtv_fndecl) = 0;
 
       gimplify_function_tree (vtv_fndecl);
@@ -1195,11 +1191,7 @@ vtv_generate_init_routine (void)
 
       symtab->process_new_functions ();
 
-#if defined (TARGET_PECOFF)
       if (flag_vtable_verify == VTV_PREINIT_PRIORITY && !TARGET_PECOFF)
-#else
-      if (flag_vtable_verify == VTV_PREINIT_PRIORITY)
-#endif
         assemble_vtv_preinit_initializer (vtv_fndecl);
 
     }
diff --git a/gcc/defaults.h b/gcc/defaults.h
index 65ffe59..c20de44 100644
--- a/gcc/defaults.h
+++ b/gcc/defaults.h
@@ -1321,6 +1321,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If not, see
 #define REVERSE_CONDITION(code, mode) reverse_condition (code)
 #endif
 
+#ifndef TARGET_PECOFF
+#define TARGET_PECOFF 0
+#endif
+
 #ifdef GCC_INSN_FLAGS_H
 /* Dependent default target macro definitions
 
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 75cef25..aa26e02 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -7793,7 +7793,7 @@ handle_vtv_comdat_section (section *sect, const_tree decl ATTRIBUTE_UNUSED)
 				 | SECTION_LINKONCE,
 				 DECL_NAME (decl));
   in_section = sect;
-#elif defined (TARGET_PECOFF)
+#else
   /* Neither OBJECT_FORMAT_PE, nor OBJECT_FORMAT_COFF is set here.
      Therefore the following check is used.
      In case a the target is PE or COFF a comdat group section
@@ -7820,8 +7820,8 @@ handle_vtv_comdat_section (section *sect, const_tree decl ATTRIBUTE_UNUSED)
 				     DECL_NAME (decl));
       in_section = sect;
     }
-#else
-  switch_to_section (sect);
+  else
+    switch_to_section (sect);
 #endif
 }
 
-- 
2.5.0.rc1.5.gc07173f


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