From owner-svn-src-all@FreeBSD.ORG Mon Jun 30 18:11:22 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD052A24; Mon, 30 Jun 2014 18:11:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9DCC246D; Mon, 30 Jun 2014 18:11:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s5UIBMjD036572; Mon, 30 Jun 2014 18:11:22 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s5UIBMxh036571; Mon, 30 Jun 2014 18:11:22 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201406301811.s5UIBMxh036571@svn.freebsd.org> From: Hans Petter Selasky Date: Mon, 30 Jun 2014 18:11:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r268055 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 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: Mon, 30 Jun 2014 18:11:22 -0000 Author: hselasky Date: Mon Jun 30 18:11:22 2014 New Revision: 268055 URL: http://svnweb.freebsd.org/changeset/base/268055 Log: Workaround for bug in GCC on powerpc64. Symbols that are exported are by fault required to be all "static" or all "extern". Modified: head/sys/sys/linker_set.h Modified: head/sys/sys/linker_set.h ============================================================================== --- head/sys/sys/linker_set.h Mon Jun 30 17:04:55 2014 (r268054) +++ head/sys/sys/linker_set.h Mon Jun 30 18:11:22 2014 (r268055) @@ -40,15 +40,26 @@ * For ELF, this is done by constructing a separate segment for each set. */ +#if defined(__powerpc64__) +/* + * Move the symbol pointer from ".text" to ".data" segment, to make + * the GCC compiler happy: + */ +#define __MAKE_SET_CONST +#else +#define __MAKE_SET_CONST const +#endif + /* * Private macros, not to be used outside this header file. */ #ifdef __GNUCLIKE___SECTION -#define __MAKE_SET(set, sym) \ - __GLOBL(__CONCAT(__start_set_,set)); \ - __GLOBL(__CONCAT(__stop_set_,set)); \ - static void const * const __set_##set##_sym_##sym \ - __section("set_" #set) __used = &sym +#define __MAKE_SET(set, sym) \ + __GLOBL(__CONCAT(__start_set_,set)); \ + __GLOBL(__CONCAT(__stop_set_,set)); \ + static void const * __MAKE_SET_CONST \ + __set_##set##_sym_##sym __section("set_" #set) \ + __used = &(sym) #else /* !__GNUCLIKE___SECTION */ #ifndef lint #error this file needs to be ported to your compiler