OSDN Git Service

2010-01-02 Richard Guenther <rguenther@suse.de>
authorrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Jan 2010 11:11:37 +0000 (11:11 +0000)
committerrguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4>
Sat, 2 Jan 2010 11:11:37 +0000 (11:11 +0000)
PR lto/41597
* toplev.c (compile_file): Emit LTO marker properly.  Change
it to __gnu_lto_v1.
* collect2.c (scan_prog_file): Adjust for changed LTO marker.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155563 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/collect2.c
gcc/toplev.c

index 81f5e2b..f153d80 100644 (file)
@@ -1,3 +1,10 @@
+2010-01-02  Richard Guenther  <rguenther@suse.de>
+
+       PR lto/41597
+       * toplev.c (compile_file): Emit LTO marker properly.  Change
+       it to __gnu_lto_v1.
+       * collect2.c (scan_prog_file): Adjust for changed LTO marker.
+
 2010-01-01  Richard Guenther  <rguenther@suse.de>
 
        PR debug/42455
index aa4b549..10adc88 100644 (file)
@@ -1,7 +1,7 @@
 /* Collect static initialization info into data structures that can be
    traversed by C++ initialization and finalization routines.
    Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
    Contributed by Chris Smith (csmith@convex.com).
    Heavily modified by Michael Meissner (meissner@cygnus.com),
@@ -2634,8 +2634,8 @@ scan_prog_file (const char *prog_name, scanpass which_pass,
              the LTO objects list if found.  */
           for (p = buf; (ch = *p) != '\0' && ch != '\n'; p++)
             if (ch == ' '
-               && (strncmp (p +1 , "gnu_lto_v1", 10) == 0)
-               && ISSPACE( p[11]))
+               && (strncmp (p + 1, "__gnu_lto_v1", 12) == 0)
+               && ISSPACE (p[13]))
               {
                 add_lto_object (&lto_objects, prog_name);
 
index 7b74754..e916c8d 100644 (file)
@@ -1,6 +1,6 @@
 /* Top level of GCC compilers (cc1, cc1plus, etc.)
    Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -1104,7 +1104,20 @@ compile_file (void)
      link errors if an object file with IL is stored into a shared
      library without invoking lto1.  */
   if (flag_generate_lto)
-    fprintf (asm_out_file,"\t.comm\tgnu_lto_v1,1,1\n");
+    {
+#if defined ASM_OUTPUT_ALIGNED_DECL_COMMON
+      ASM_OUTPUT_ALIGNED_DECL_COMMON (asm_out_file, NULL_TREE,
+                                     "__gnu_lto_v1",
+                                     (unsigned HOST_WIDE_INT) 1, 8);
+#elif defined ASM_OUTPUT_ALIGNED_COMMON
+      ASM_OUTPUT_ALIGNED_COMMON (asm_out_file, "__gnu_lto_v1",
+                                (unsigned HOST_WIDE_INT) 1, 8);
+#else
+      ASM_OUTPUT_COMMON (asm_out_file, "__gnu_lto_v1",
+                        (unsigned HOST_WIDE_INT) 1,
+                        (unsigned HOST_WIDE_INT) 1);
+#endif
+    }
 
   /* Attach a special .ident directive to the end of the file to identify
      the version of GCC which compiled this code.  The format of the .ident