Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Aug 2010 13:00:29 +0000 (UTC)
From:      Rui Paulo <rpaulo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r211843 - head/contrib/gcc
Message-ID:  <201008261300.o7QD0TH5043486@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rpaulo
Date: Thu Aug 26 13:00:29 2010
New Revision: 211843
URL: http://svn.freebsd.org/changeset/base/211843

Log:
  Mark __JCR_LIST__, __DTOR_END__, __JCR_END__, __FRAME_END__ as used to
  avoid segfaults when building with clang.
  
  Permission to backport given by Jan hubicka <jh at suse.cz>.

Modified:
  head/contrib/gcc/crtstuff.c

Modified: head/contrib/gcc/crtstuff.c
==============================================================================
--- head/contrib/gcc/crtstuff.c	Thu Aug 26 11:46:38 2010	(r211842)
+++ head/contrib/gcc/crtstuff.c	Thu Aug 26 13:00:29 2010	(r211843)
@@ -211,7 +211,7 @@ STATIC EH_FRAME_SECTION_CONST char __EH_
 /* Stick a label at the beginning of the java class registration info
    so we can register them properly.  */
 STATIC void *__JCR_LIST__[]
-  __attribute__ ((unused, section(JCR_SECTION_NAME), aligned(sizeof(void*))))
+  __attribute__ ((used, section(JCR_SECTION_NAME), aligned(sizeof(void*))))
   = { };
 #endif /* JCR_SECTION_NAME */
 
@@ -472,11 +472,11 @@ DTOR_LIST_END;
 #elif defined(DTORS_SECTION_ASM_OP)
 asm (DTORS_SECTION_ASM_OP);
 STATIC func_ptr __DTOR_END__[1]
-  __attribute__ ((unused, aligned(sizeof(func_ptr))))
+  __attribute__ ((used, aligned(sizeof(func_ptr))))
   = { (func_ptr) 0 };
 #else
 STATIC func_ptr __DTOR_END__[1]
-  __attribute__((unused, section(".dtors"), aligned(sizeof(func_ptr))))
+  __attribute__((used, section(".dtors"), aligned(sizeof(func_ptr))))
   = { (func_ptr) 0 };
 #endif
 
@@ -493,7 +493,7 @@ typedef short int32;
 #  error "Missing a 4 byte integer"
 # endif
 STATIC EH_FRAME_SECTION_CONST int32 __FRAME_END__[]
-     __attribute__ ((unused, section(EH_FRAME_SECTION_NAME),
+     __attribute__ ((used, section(EH_FRAME_SECTION_NAME),
 		     aligned(sizeof(int32))))
      = { 0 };
 #endif /* EH_FRAME_SECTION_NAME */
@@ -501,7 +501,7 @@ STATIC EH_FRAME_SECTION_CONST int32 __FR
 #ifdef JCR_SECTION_NAME
 /* Null terminate the .jcr section array.  */
 STATIC void *__JCR_END__[1] 
-   __attribute__ ((unused, section(JCR_SECTION_NAME),
+   __attribute__ ((used, section(JCR_SECTION_NAME),
 		   aligned(sizeof(void *))))
    = { 0 };
 #endif /* JCR_SECTION_NAME */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201008261300.o7QD0TH5043486>