Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
Arfrever Frehtes Taifersar Arahesis wrote: | 2008-07-09 15:45:15 Doug Goldstein napisał(a): | Luca Barbato wrote: | Fabian Groffen wrote: | On 30-06-2008 17:35:08 +0200, Arfrever Frehtes Taifersar Arahesis wrote: | How can you easily revert it in a profile? | You can set LDFLAGS= in a subprofiles's make.defaults. | How elegant... but I guess I'll have no choice. | Shouldn't possible have a subprofile with compiler/linker specifics | and move there non sharable stuff and keep base leaner? | | lu | | I'm just going to commit this to default/linux in about 20 minutes - -Wl,-O1 | | Cardoe informed me that he planned to add --hash-style=gnu and - --sort-common | to default LDFLAGS in the future. | | Does anybody know any packages / architectures (except mips) which have any | problems with these flags? | Sorry I'm late. This is for BSDs if anyone is interested: * --hash-style=gnu doesn't work. * --sort-common has no problems. * -O1 makes a bit difficult (if not impossible) to obtain decent backtraces while debugging certain things. unimportant side story While -O1 works just fine for everything I've tested so far, if something fails and you want a backtrace out of a coredump or while debugging a binary, you may only get the last call, everything else on the stack is lost in 0x limbo. I experienced this while debugging a stack overflow in Python's cPickle, which could be the reason for this behavior (stack gone wild), but removing -O1 made decent dumps/traces. Of course I shouldn't have been debugging things with -Wl,-O1 in the first place but oh well :+) / -- gentoo-dev@lists.gentoo.org mailing list
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
Luca Barbato wrote: Fabian Groffen wrote: On 30-06-2008 17:35:08 +0200, Arfrever Frehtes Taifersar Arahesis wrote: How can you easily revert it in a profile? You can set LDFLAGS= in a subprofiles's make.defaults. How elegant... but I guess I'll have no choice. Shouldn't possible have a subprofile with compiler/linker specifics and move there non sharable stuff and keep base leaner? lu I'm just going to commit this to default/linux in about 20 minutes -Wl,-O1 -- gentoo-dev@lists.gentoo.org mailing list
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
2008-07-09 15:45:15 Doug Goldstein napisał(a): Luca Barbato wrote: Fabian Groffen wrote: On 30-06-2008 17:35:08 +0200, Arfrever Frehtes Taifersar Arahesis wrote: How can you easily revert it in a profile? You can set LDFLAGS= in a subprofiles's make.defaults. How elegant... but I guess I'll have no choice. Shouldn't possible have a subprofile with compiler/linker specifics and move there non sharable stuff and keep base leaner? lu I'm just going to commit this to default/linux in about 20 minutes -Wl,-O1 Cardoe informed me that he planned to add --hash-style=gnu and --sort-common to default LDFLAGS in the future. Does anybody know any packages / architectures (except mips) which have any problems with these flags? -- Arfrever Frehtes Taifersar Arahesis signature.asc Description: This is a digitally signed message part.
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
Fabian Groffen wrote: On 30-06-2008 17:35:08 +0200, Arfrever Frehtes Taifersar Arahesis wrote: How can you easily revert it in a profile? You can set LDFLAGS= in a subprofiles's make.defaults. How elegant... but I guess I'll have no choice. Shouldn't possible have a subprofile with compiler/linker specifics and move there non sharable stuff and keep base leaner? lu -- Luca Barbato Gentoo Council Member Gentoo/linux Gentoo/PPC http://dev.gentoo.org/~lu_zero -- gentoo-dev@lists.gentoo.org mailing list
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
On 29-06-2008 20:28:39 -0700, Donnie Berkholz wrote: On 23:15 Sun 29 Jun , Fabian Groffen wrote: On 29-06-2008 07:29:57 -0400, Mike Frysinger wrote: On Saturday 28 June 2008, Petteri Räty wrote: Arfrever Frehtes Taifersar Arahesis kirjoitti: I would like to suggest that default LDFLAGS in Gentoo contain the following flags: -Wl,-O1,--hash-style=gnu,--sort-common. -O1 enables some basic optimizations. At least adding -O1 should not be problematic. I think vapier was already suggesting this quite a while ago. imo -Wl,-O1 should go into base I prefer not. Please only on profiles that use GNU binutils as linker. That's the rule, not the exception, so I think that profiles with non-gnu linkers should revert it. In the current world of gentoo-x86 it is the rule. But what will you do once Sun Studio becomes open source, and you want to allow people that like to have better performance to use it? What if Gentoo Prefix ever gets merged back into gentoo-x86? How can you easily revert it in a profile? Using strip-ldflags alike? That feels nasty to me. If it is trivial to remove it again, considering there may be more in LDFLAGS, then it is less of a problem to me. Maybe there is such a way, and I just missed it. -- Fabian Groffen Gentoo on a different level -- gentoo-dev@lists.gentoo.org mailing list
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
2008-06-30 10:57:21 Fabian Groffen napisał(a): On 29-06-2008 20:28:39 -0700, Donnie Berkholz wrote: On 23:15 Sun 29 Jun , Fabian Groffen wrote: On 29-06-2008 07:29:57 -0400, Mike Frysinger wrote: On Saturday 28 June 2008, Petteri Räty wrote: Arfrever Frehtes Taifersar Arahesis kirjoitti: I would like to suggest that default LDFLAGS in Gentoo contain the following flags: -Wl,-O1,--hash-style=gnu,--sort-common. -O1 enables some basic optimizations. At least adding -O1 should not be problematic. I think vapier was already suggesting this quite a while ago. imo -Wl,-O1 should go into base I prefer not. Please only on profiles that use GNU binutils as linker. That's the rule, not the exception, so I think that profiles with non-gnu linkers should revert it. In the current world of gentoo-x86 it is the rule. But what will you do once Sun Studio becomes open source, and you want to allow people that like to have better performance to use it? What if Gentoo Prefix ever gets merged back into gentoo-x86? How can you easily revert it in a profile? You can set LDFLAGS= in a subprofiles's make.defaults. -- Arfrever Frehtes Taifersar Arahesis signature.asc Description: This is a digitally signed message part.
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
On 30-06-2008 17:35:08 +0200, Arfrever Frehtes Taifersar Arahesis wrote: How can you easily revert it in a profile? You can set LDFLAGS= in a subprofiles's make.defaults. How elegant... but I guess I'll have no choice. -- Fabian Groffen Gentoo on a different level -- gentoo-dev@lists.gentoo.org mailing list
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
Mike Frysinger kirjoitti: On Saturday 28 June 2008, Petteri Räty wrote: Arfrever Frehtes Taifersar Arahesis kirjoitti: I would like to suggest that default LDFLAGS in Gentoo contain the following flags: -Wl,-O1,--hash-style=gnu,--sort-common. -O1 enables some basic optimizations. At least adding -O1 should not be problematic. I think vapier was already suggesting this quite a while ago. imo -Wl,-O1 should go into base -mike So seems like we should just do it (tm). Regards, Petteri signature.asc Description: OpenPGP digital signature
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
On Saturday 28 June 2008, Petteri Räty wrote: Arfrever Frehtes Taifersar Arahesis kirjoitti: I would like to suggest that default LDFLAGS in Gentoo contain the following flags: -Wl,-O1,--hash-style=gnu,--sort-common. -O1 enables some basic optimizations. At least adding -O1 should not be problematic. I think vapier was already suggesting this quite a while ago. imo -Wl,-O1 should go into base -mike signature.asc Description: This is a digitally signed message part.
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
On 29-06-2008 07:29:57 -0400, Mike Frysinger wrote: On Saturday 28 June 2008, Petteri Räty wrote: Arfrever Frehtes Taifersar Arahesis kirjoitti: I would like to suggest that default LDFLAGS in Gentoo contain the following flags: -Wl,-O1,--hash-style=gnu,--sort-common. -O1 enables some basic optimizations. At least adding -O1 should not be problematic. I think vapier was already suggesting this quite a while ago. imo -Wl,-O1 should go into base I prefer not. Please only on profiles that use GNU binutils as linker. -- Fabian Groffen Gentoo on a different level -- gentoo-dev@lists.gentoo.org mailing list
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
On 23:15 Sun 29 Jun , Fabian Groffen wrote: On 29-06-2008 07:29:57 -0400, Mike Frysinger wrote: On Saturday 28 June 2008, Petteri Räty wrote: Arfrever Frehtes Taifersar Arahesis kirjoitti: I would like to suggest that default LDFLAGS in Gentoo contain the following flags: -Wl,-O1,--hash-style=gnu,--sort-common. -O1 enables some basic optimizations. At least adding -O1 should not be problematic. I think vapier was already suggesting this quite a while ago. imo -Wl,-O1 should go into base I prefer not. Please only on profiles that use GNU binutils as linker. That's the rule, not the exception, so I think that profiles with non-gnu linkers should revert it. Thanks, Donnie -- gentoo-dev@lists.gentoo.org mailing list
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
Arfrever Frehtes Taifersar Arahesis kirjoitti: I would like to suggest that default LDFLAGS in Gentoo contain the following flags: -Wl,-O1,--hash-style=gnu,--sort-common. -O1 enables some basic optimizations. At least adding -O1 should not be problematic. I think vapier was already suggesting this quite a while ago. Regards, Petteri signature.asc Description: OpenPGP digital signature
[gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
I would like to suggest that default LDFLAGS in Gentoo contain the following flags: -Wl,-O1,--hash-style=gnu,--sort-common. -O1 enables some basic optimizations. --hash-style=gnu causes that ld creates only new GNU-style hash tables. --sort-common causes that ld sorts the common symbols by size when it places them in the appropriate output sections. These options don't cause any problems, so they should be less controversial than --as-needed. (These options don't conflict with --as-needed, so --as-needed can be still added to default LDFLAGS, but this thread isn't about --as-needed.) -- Arfrever Frehtes Taifersar Arahesis -- gentoo-dev@lists.gentoo.org mailing list
Re: [gentoo-dev] Suggested default LDFLAGS+=-Wl,-O1,--hash-style=gnu,--sort-common
On 24-06-2008 14:15:10 +0200, Arfrever Frehtes Taifersar Arahesis wrote: I would like to suggest that default LDFLAGS in Gentoo contain the following flags: -Wl,-O1,--hash-style=gnu,--sort-common. -O1 enables some basic optimizations. --hash-style=gnu causes that ld creates only new GNU-style hash tables. --sort-common causes that ld sorts the common symbols by size when it places them in the appropriate output sections. These options don't cause any problems, so they should be less controversial than --as-needed. (These options don't conflict with --as-needed, so --as-needed can be still added to default LDFLAGS, but this thread isn't about --as-needed.) as long as it doesn't go in /base, but in the linux/freebsd profiles instead, it's fine with me. -- Fabian Groffen Gentoo on a different level -- gentoo-dev@lists.gentoo.org mailing list