Doug Goldstein | 15 Jul 21:31
Favicon

LDFLAGS=-Wl,--hash-style=gnu

all,

I'm at the point that -Wl,-O1 appears to be successful. It's time to 
toss on -Wl,--hash-style=gnu. The issue is that we need glibc 2.5 or 
higher and not mips. So one solution is to put the following:

default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
default/linux/mips: LDFLAGS="-Wl,-O1"

However, this means we'll have to put a has_version check in 
profile.bashrc of default/linux, which seems a bit cludgy..

Any suggestions? Comments?
--

-- 
gentoo-dev <at> lists.gentoo.org mailing list

Fabian Groffen | 15 Jul 21:39
Favicon

Re: LDFLAGS=-Wl,--hash-style=gnu

On 15-07-2008 15:32:32 -0400, Doug Goldstein wrote:
> all,
>
> I'm at the point that -Wl,-O1 appears to be successful. It's time to  
> toss on -Wl,--hash-style=gnu. The issue is that we need glibc 2.5 or  
> higher and not mips. So one solution is to put the following:
>
> default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
> default/linux/mips: LDFLAGS="-Wl,-O1"
>
> However, this means we'll have to put a has_version check in  
> profile.bashrc of default/linux, which seems a bit cludgy..
>
> Any suggestions? Comments?

I'm just wondering... unless it has changed since last time I installed
Gentoo Linux, but isn't the installation manual on purpose conservative
with CFLAGS?  make.conf.example also does not much more than
"-march -O2 -pipe".  -O1 to the linker feels conservative to me.  Still,
do we really need to go any further?  Why not make additional pointers
to possible values for LDFLAGS like we do for C(XX)FLAGS in the
installation manual?

-- 
Fabian Groffen
Gentoo on a different level
--

-- 
gentoo-dev <at> lists.gentoo.org mailing list

(Continue reading)

Ryan Hill | 16 Jul 03:23
Favicon

Re: LDFLAGS=-Wl,--hash-style=gnu

On Tue, 15 Jul 2008 21:39:00 +0200
Fabian Groffen <grobian <at> gentoo.org> wrote:

> On 15-07-2008 15:32:32 -0400, Doug Goldstein wrote:
> > all,
> >
> > I'm at the point that -Wl,-O1 appears to be successful. It's time
> > to toss on -Wl,--hash-style=gnu. The issue is that we need glibc
> > 2.5 or higher and not mips. So one solution is to put the following:
> >
> > default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
> > default/linux/mips: LDFLAGS="-Wl,-O1"
> >
> > However, this means we'll have to put a has_version check in  
> > profile.bashrc of default/linux, which seems a bit cludgy..
> >
> > Any suggestions? Comments?

Also >sys-devel/binutils-2.17.

> I'm just wondering... unless it has changed since last time I
> installed Gentoo Linux, but isn't the installation manual on purpose
> conservative with CFLAGS?  make.conf.example also does not much more
> than "-march -O2 -pipe".  -O1 to the linker feels conservative to
> me.  Still, do we really need to go any further?  Why not make
> additional pointers to possible values for LDFLAGS like we do for
> C(XX)FLAGS in the installation manual?

+1.

(Continue reading)

Doug Goldstein | 16 Jul 04:09
Favicon

Re: Re: LDFLAGS=-Wl,--hash-style=gnu

Ryan Hill wrote:
> On Tue, 15 Jul 2008 21:39:00 +0200
> Fabian Groffen <grobian <at> gentoo.org> wrote:
> 
>> On 15-07-2008 15:32:32 -0400, Doug Goldstein wrote:
>>> all,
>>>
>>> I'm at the point that -Wl,-O1 appears to be successful. It's time
>>> to toss on -Wl,--hash-style=gnu. The issue is that we need glibc
>>> 2.5 or higher and not mips. So one solution is to put the following:
>>>
>>> default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
>>> default/linux/mips: LDFLAGS="-Wl,-O1"
>>>
>>> However, this means we'll have to put a has_version check in  
>>> profile.bashrc of default/linux, which seems a bit cludgy..
>>>
>>> Any suggestions? Comments?
> 
> Also >sys-devel/binutils-2.17.
> 
>> I'm just wondering... unless it has changed since last time I
>> installed Gentoo Linux, but isn't the installation manual on purpose
>> conservative with CFLAGS?  make.conf.example also does not much more
>> than "-march -O2 -pipe".  -O1 to the linker feels conservative to
>> me.  Still, do we really need to go any further?  Why not make
>> additional pointers to possible values for LDFLAGS like we do for
>> C(XX)FLAGS in the installation manual?
> 
> +1.
(Continue reading)

Ryan Hill | 16 Jul 04:28
Favicon

Re: LDFLAGS=-Wl,--hash-style=gnu

On Tue, 15 Jul 2008 22:09:36 -0400
Doug Goldstein <cardoe <at> gentoo.org> wrote:

> Ryan Hill wrote:
> > On Tue, 15 Jul 2008 21:39:00 +0200
> > Fabian Groffen <grobian <at> gentoo.org> wrote:
> > 
> >> On 15-07-2008 15:32:32 -0400, Doug Goldstein wrote:
> >>> all,
> >>>
> >>> I'm at the point that -Wl,-O1 appears to be successful. It's time
> >>> to toss on -Wl,--hash-style=gnu. The issue is that we need glibc
> >>> 2.5 or higher and not mips. So one solution is to put the
> >>> following:
> >>>
> >>> default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
> >>> default/linux/mips: LDFLAGS="-Wl,-O1"
> >>>
> >>> However, this means we'll have to put a has_version check in  
> >>> profile.bashrc of default/linux, which seems a bit cludgy..
> >>>
> >>> Any suggestions? Comments?
> > 
> > Also >sys-devel/binutils-2.17.
> > 
> >> I'm just wondering... unless it has changed since last time I
> >> installed Gentoo Linux, but isn't the installation manual on
> >> purpose conservative with CFLAGS?  make.conf.example also does not
> >> much more than "-march -O2 -pipe".  -O1 to the linker feels
> >> conservative to me.  Still, do we really need to go any further?
(Continue reading)

Re: Re: LDFLAGS=-Wl,--hash-style=gnu

2008-07-16 04:28:33 Ryan Hill napisał(a):
> On Tue, 15 Jul 2008 22:09:36 -0400
> Doug Goldstein <cardoe <at> gentoo.org> wrote:
> 
> > Ryan Hill wrote:
> > > On Tue, 15 Jul 2008 21:39:00 +0200
> > > Fabian Groffen <grobian <at> gentoo.org> wrote:
> > > 
> > >> On 15-07-2008 15:32:32 -0400, Doug Goldstein wrote:
> > >>> all,
> > >>>
> > >>> I'm at the point that -Wl,-O1 appears to be successful. It's time
> > >>> to toss on -Wl,--hash-style=gnu. The issue is that we need glibc
> > >>> 2.5 or higher and not mips. So one solution is to put the
> > >>> following:
> > >>>
> > >>> default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
> > >>> default/linux/mips: LDFLAGS="-Wl,-O1"
> > >>>
> > >>> However, this means we'll have to put a has_version check in  
> > >>> profile.bashrc of default/linux, which seems a bit cludgy..
> > >>>
> > >>> Any suggestions? Comments?
> > > 
> > > Also >sys-devel/binutils-2.17.
> > > 
> > >> I'm just wondering... unless it has changed since last time I
> > >> installed Gentoo Linux, but isn't the installation manual on
> > >> purpose conservative with CFLAGS?  make.conf.example also does not
> > >> much more than "-march -O2 -pipe".  -O1 to the linker feels
(Continue reading)

Re: Re: LDFLAGS=-Wl,--hash-style=gnu

2008-07-16 03:23:05 Ryan Hill napisał(a):
> On Tue, 15 Jul 2008 21:39:00 +0200
> Fabian Groffen <grobian <at> gentoo.org> wrote:
> 
> > On 15-07-2008 15:32:32 -0400, Doug Goldstein wrote:
> > > all,
> > >
> > > I'm at the point that -Wl,-O1 appears to be successful. It's time
> > > to toss on -Wl,--hash-style=gnu. The issue is that we need glibc
> > > 2.5 or higher and not mips. So one solution is to put the following:
> > >
> > > default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
> > > default/linux/mips: LDFLAGS="-Wl,-O1"
> > >
> > > However, this means we'll have to put a has_version check in  
> > > profile.bashrc of default/linux, which seems a bit cludgy..
> > >
> > > Any suggestions? Comments?
> 
> Also >sys-devel/binutils-2.17.

More precisely >=sys-devel/binutils-2.17.50.0.2.

--

-- 
Arfrever Frehtes Taifersar Arahesis
Josh Saddler | 16 Jul 05:11
Favicon

Re: LDFLAGS=-Wl,--hash-style=gnu

Fabian Groffen wrote:
> I'm just wondering... unless it has changed since last time I installed
> Gentoo Linux, but isn't the installation manual on purpose conservative
> with CFLAGS?  make.conf.example also does not much more than
> "-march -O2 -pipe".  -O1 to the linker feels conservative to me.  Still,
> do we really need to go any further?  Why not make additional pointers
> to possible values for LDFLAGS like we do for C(XX)FLAGS in the
> installation manual?

CFLAGS != LDFLAGS, so the installation handbook has never covered them. 
And yes, we are conservative in our documentation with regards to 
optimization, because that's the smart choice.

Ya'll may want to take a look at the compilation optimization guide at 
[1], specifically the FAQ on LDFLAGS. I may need to reword this section 
a bit given how the stance on LDFLAGS has shifted.

[1] http://www.gentoo.org/doc/en/gcc-optimization.xml#doc_chap3_sect4

Doug Goldstein | 16 Jul 18:38
Favicon

Re: LDFLAGS=-Wl,--hash-style=gnu

Doug Goldstein wrote:
> all,
>
> I'm at the point that -Wl,-O1 appears to be successful. It's time to 
> toss on -Wl,--hash-style=gnu. The issue is that we need glibc 2.5 or 
> higher and not mips. So one solution is to put the following:
>
> default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
> default/linux/mips: LDFLAGS="-Wl,-O1"
>
> However, this means we'll have to put a has_version check in 
> profile.bashrc of default/linux, which seems a bit cludgy..
>
> Any suggestions? Comments?
Given the benefits vs the annoyances of not all platforms supporting it 
and requiring 2 has_version checks in profile.bashrc. I'd be in favor of 
skipping this flag from the defaults. Possibly adding a documentation 
notice about it but that's it.
--

-- 
gentoo-dev <at> lists.gentoo.org mailing list

Re: LDFLAGS=-Wl,--hash-style=gnu

2008-07-16 18:38:47 Doug Goldstein napisał(a):
> Doug Goldstein wrote:
> > all,
> >
> > I'm at the point that -Wl,-O1 appears to be successful. It's time to 
> > toss on -Wl,--hash-style=gnu. The issue is that we need glibc 2.5 or 
> > higher and not mips. So one solution is to put the following:
> >
> > default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
> > default/linux/mips: LDFLAGS="-Wl,-O1"
> >
> > However, this means we'll have to put a has_version check in 
> > profile.bashrc of default/linux, which seems a bit cludgy..
> >
> > Any suggestions? Comments?
> Given the benefits vs the annoyances of not all platforms supporting it

There's only one platform not supporting -Wl,--hash-style=gnu and putting
LDFLAGS="-Wl,-O1" in default/linux/mips/make.defaults doesn't cause any
problems.

> and requiring 2 has_version checks in profile.bashrc.

IMO 1-second has_version checks aren't annoying.

--

-- 
Arfrever Frehtes Taifersar Arahesis

Re: LDFLAGS=-Wl,--hash-style=gnu

2008-07-16 18:38:47 Doug Goldstein napisał(a):
> Doug Goldstein wrote:
> > all,
> >
> > I'm at the point that -Wl,-O1 appears to be successful. It's time to 
> > toss on -Wl,--hash-style=gnu. The issue is that we need glibc 2.5 or 
> > higher and not mips. So one solution is to put the following:
> >
> > default/linux: LDFLAGS="-Wl,-O1,--hash-style=gnu"
> > default/linux/mips: LDFLAGS="-Wl,-O1"
> >
> > However, this means we'll have to put a has_version check in 
> > profile.bashrc of default/linux, which seems a bit cludgy..
> >
> > Any suggestions? Comments?
> Given the benefits vs the annoyances of not all platforms supporting it 
> and requiring 2 has_version checks in profile.bashrc.

has_version checks can be called only once per package:

if [[ "${EBUILD_PHASE}" == "setup" ]] ; then
        if has_version "<sys-libs/glibc-2.5" || has_version "<sys-devel/binutils-2.17.50.0.2" ; then
                LDFLAGS="${LDFLAGS//-Wl,--hash-style=gnu/}"
        fi
fi

--

-- 
Arfrever Frehtes Taifersar Arahesis

Gmane