SOURCES: gcc-pr20218.patch - updated from http://gcc.gnu.org/ml/gc...

arekm arekm at pld-linux.org
Sat Feb 10 00:42:57 CET 2007


Author: arekm                        Date: Fri Feb  9 23:42:57 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated from http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00671.html

---- Files affected:
SOURCES:
   gcc-pr20218.patch (1.7 -> 1.8) 

---- Diffs:

================================================================
Index: SOURCES/gcc-pr20218.patch
diff -u SOURCES/gcc-pr20218.patch:1.7 SOURCES/gcc-pr20218.patch:1.8
--- SOURCES/gcc-pr20218.patch:1.7	Wed Dec  6 16:45:53 2006
+++ SOURCES/gcc-pr20218.patch	Sat Feb 10 00:42:51 2007
@@ -1,9 +1,11 @@
-2006-12-06  H.J. Lu  <hongjiu.lu at intel.com>
+2006-12-07  H.J. Lu  <hongjiu.lu at intel.com>
 
+	Backport from mainline:
+	2006-12-11  H.J. Lu  <hongjiu.lu at intel.com>
 	PR middle-end/17982
 	PR middle-end/20218
-	* cgraphunit.c (cgraph_optimize): Don't call
-	process_pending_assemble_externals for ELF targets.
+	* cgraphunit.c (cgraph_optimize): Remove call to
+	process_pending_assemble_externals.
 
 	* config/elfos.h (ASM_OUTPUT_EXTERNAL): New.
 
@@ -19,27 +21,26 @@
 	(default_elf_asm_output_external): New.
 	(maybe_assemble_visibility): New.
 
-	* varasm.c (maybe_assemble_visibility): Make it extern and
-	return int.
+	* toplev.c (compile_file): Update comment.
+
+	* varasm.c (assemble_external): Always put it on
+	pending_assemble_externals.
+	(maybe_assemble_visibility): Make it extern and return int.
 	(default_elf_asm_output_external): New.
 
---- gcc/cgraphunit.c.global	2006-12-02 09:32:10.000000000 -0800
-+++ gcc/cgraphunit.c	2006-12-06 06:10:58.000000000 -0800
-@@ -1536,7 +1536,12 @@ cgraph_optimize (void)
+--- gcc/cgraphunit.c.global	2006-12-07 05:45:18.000000000 -0800
++++ gcc/cgraphunit.c	2006-12-07 05:47:22.000000000 -0800
+@@ -1536,8 +1536,6 @@ cgraph_optimize (void)
        return;
      }
  
-+  /* FIXME: For ELF targets, we want to process undefined symbols later
-+     so that we can check if they are referenced or not.  Should we do
-+     the same for all targets?  */
-+#ifndef OBJECT_FORMAT_ELF
-   process_pending_assemble_externals ();
-+#endif
- 
+-  process_pending_assemble_externals ();
+-
    /* Frontend may output common variables after the unit has been finalized.
       It is safe to deal with them here as they are always zero initialized.  */
---- gcc/config/elfos.h.global	2006-12-02 09:32:10.000000000 -0800
-+++ gcc/config/elfos.h	2006-12-05 15:16:22.000000000 -0800
+   cgraph_varpool_analyze_pending_decls ();
+--- gcc/config/elfos.h.global	2006-11-30 12:45:20.000000000 -0800
++++ gcc/config/elfos.h	2006-12-07 05:47:22.000000000 -0800
 @@ -499,3 +499,13 @@ Boston, MA 02110-1301, USA.  */
          fprintf ((FILE), "\"\n");					\
      }									\
@@ -54,8 +55,8 @@
 +#define ASM_OUTPUT_EXTERNAL(FILE, DECL, NAME) \
 +  default_elf_asm_output_external (FILE, DECL, NAME)
 +#endif
---- gcc/config/ia64/hpux.h.global	2006-10-27 10:09:07.000000000 -0700
-+++ gcc/config/ia64/hpux.h	2006-12-05 15:16:22.000000000 -0800
+--- gcc/config/ia64/hpux.h.global	2006-10-29 17:03:12.000000000 -0800
++++ gcc/config/ia64/hpux.h	2006-12-07 05:47:22.000000000 -0800
 @@ -144,10 +144,6 @@ do {								\
     definitions, so do not use them in gthr-posix.h.  */
  #define GTHREAD_USE_WEAK 0
@@ -67,8 +68,8 @@
  #undef CTORS_SECTION_ASM_OP
  #define CTORS_SECTION_ASM_OP  "\t.section\t.init_array,\t\"aw\",\"init_array\""
  
---- gcc/config/ia64/ia64.c.global	2006-11-16 09:57:21.000000000 -0800
-+++ gcc/config/ia64/ia64.c	2006-12-05 15:16:22.000000000 -0800
+--- gcc/config/ia64/ia64.c.global	2006-12-07 05:45:17.000000000 -0800
++++ gcc/config/ia64/ia64.c	2006-12-07 05:47:22.000000000 -0800
 @@ -255,10 +255,6 @@ static section *ia64_rwreloc_select_rtx_
  						 unsigned HOST_WIDE_INT)
       ATTRIBUTE_UNUSED;
@@ -210,8 +211,8 @@
  }
  
  /* Set SImode div/mod functions, init_integral_libfuncs only initializes
---- gcc/output.h.global	2006-10-17 07:32:38.000000000 -0700
-+++ gcc/output.h	2006-12-05 15:16:22.000000000 -0800
+--- gcc/output.h.global	2006-10-21 13:45:54.000000000 -0700
++++ gcc/output.h	2006-12-07 05:47:22.000000000 -0800
 @@ -204,9 +204,9 @@ extern void assemble_variable (tree, int
     DONT_OUTPUT_DATA is from assemble_variable.  */
  extern void align_variable (tree decl, bool dont_output_data);
@@ -236,8 +237,21 @@
  extern int default_address_cost (rtx);
  
  /* dbxout helper functions */
---- gcc/varasm.c.global	2006-10-17 07:32:38.000000000 -0700
-+++ gcc/varasm.c	2006-12-06 06:05:43.000000000 -0800
+--- gcc/toplev.c.global	2006-12-07 05:45:18.000000000 -0800
++++ gcc/toplev.c	2006-12-07 05:58:23.000000000 -0800
+@@ -1076,9 +1076,7 @@ compile_file (void)
+ 
+   dw2_output_indirect_constants ();
+ 
+-  /* Flush any pending external directives.  cgraph did this for
+-     assemble_external calls from the front end, but the RTL
+-     expander can also generate them.  */
++  /* Flush any pending external directives.  */
+   process_pending_assemble_externals ();
+ 
+   /* Attach a special .ident directive to the end of the file to identify
+--- gcc/varasm.c.global	2006-12-07 05:45:18.000000000 -0800
++++ gcc/varasm.c	2006-12-07 05:49:16.000000000 -0800
 @@ -126,7 +126,6 @@ static unsigned HOST_WIDE_INT array_size
  static unsigned min_align (unsigned, unsigned);
  static void output_constructor (tree, unsigned HOST_WIDE_INT, unsigned int);
@@ -246,7 +260,23 @@
  #ifdef BSS_SECTION_ASM_OP
  #ifdef ASM_OUTPUT_BSS
  static void asm_output_bss (FILE *, tree, const char *,
-@@ -5071,13 +5070,18 @@ default_assemble_visibility (tree decl, 
+@@ -1964,11 +1963,10 @@ assemble_external (tree decl ATTRIBUTE_U
+   if (!DECL_P (decl) || !DECL_EXTERNAL (decl) || !TREE_PUBLIC (decl))
+     return;
+ 
+-  if (flag_unit_at_a_time)
+-    pending_assemble_externals = tree_cons (0, decl,
+-					    pending_assemble_externals);
+-  else
+-    assemble_external_real (decl);
++  /* We want to output external symbols at very last to check if they
++     are references or not.  */
++  pending_assemble_externals = tree_cons (0, decl,
++					  pending_assemble_externals);
+ #endif
+ }
+ 
+@@ -5071,13 +5069,18 @@ default_assemble_visibility (tree decl, 
  
  /* A helper function to call assemble_visibility when needed for a decl.  */
  
@@ -267,8 +297,8 @@
  }
  
  /* Returns 1 if the target configuration supports defining public symbols
-@@ -6226,4 +6230,19 @@ output_object_blocks (void)
-   htab_traverse (object_block_htab, output_object_block_htab, NULL);
+@@ -6327,4 +6330,19 @@ elf_record_gcc_switches (print_switch_ty
+   return 0;
  }
  
 +/* Emit text to declare externally defined symbols. It is needed to
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/gcc-pr20218.patch?r1=1.7&r2=1.8&f=u



More information about the pld-cvs-commit mailing list