From owner-svn-src-head@FreeBSD.ORG Mon Jun 30 18:37:18 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90F3E456; Mon, 30 Jun 2014 18:37:18 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6685226A5; Mon, 30 Jun 2014 18:37:18 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 3D195B917; Mon, 30 Jun 2014 14:37:17 -0400 (EDT) From: John Baldwin To: Hans Petter Selasky Subject: Re: svn commit: r268055 - head/sys/sys Date: Mon, 30 Jun 2014 14:37:08 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201406301811.s5UIBMxh036571@svn.freebsd.org> In-Reply-To: <201406301811.s5UIBMxh036571@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201406301437.08687.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 30 Jun 2014 14:37:17 -0400 (EDT) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jun 2014 18:37:18 -0000 On Monday, June 30, 2014 2:11:22 pm Hans Petter Selasky wrote: > 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) Reindenting the whitespace made this diff harder to read. Why hasn't this been a problem before on powerpc64? -- John Baldwin