From owner-svn-src-all@FreeBSD.ORG Thu Aug 26 13:00:29 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B54E81065673; Thu, 26 Aug 2010 13:00:29 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 8AE528FC21; Thu, 26 Aug 2010 13:00:29 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o7QD0Tul043488; Thu, 26 Aug 2010 13:00:29 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o7QD0TH5043486; Thu, 26 Aug 2010 13:00:29 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201008261300.o7QD0TH5043486@svn.freebsd.org> From: Rui Paulo Date: Thu, 26 Aug 2010 13:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r211843 - head/contrib/gcc X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 26 Aug 2010 13:00:29 -0000 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 . 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 */