View previous topic :: View next topic |
Author |
Message |
Ateo Advocate
Joined: 02 Jun 2003 Posts: 2021 Location: Republic of California
|
Posted: Sat Oct 02, 2004 4:47 am Post subject: |
|
|
Thanks |
|
Back to top |
|
|
b-o-s-s n00b
Joined: 14 Jul 2003 Posts: 36
|
Posted: Thu Oct 07, 2004 9:44 pm Post subject: |
|
|
To the ones getting this very noticeable effect on application startup-times with the linker flags: Do you only set your CFLAGS accordingly, or do you also set the LDFLAGS in /etc/make.conf?
Because, if only setting the CFLAGS with the -Wl,... stuff, then how should the linker know about the intended flags? Sure, if compilation and linkage are performed in one run, it works. But what if these actions are seperated, which is the common case? "gcc -c ..." gets called with the CFLAGS, then ld gets called with LDFLAGS (which are unset). Isn't this the way it works?
Thanks! |
|
Back to top |
|
|
aethyr Veteran
Joined: 06 Apr 2003 Posts: 1085 Location: NYC
|
Posted: Fri Oct 08, 2004 3:43 am Post subject: |
|
|
b-o-s-s wrote: | To the ones getting this very noticeable effect on application startup-times with the linker flags: Do you only set your CFLAGS accordingly, or do you also set the LDFLAGS in /etc/make.conf? |
As stated in the first post, add a line to your make.conf which says:
Last edited by aethyr on Sat Oct 09, 2004 7:13 am; edited 1 time in total |
|
Back to top |
|
|
MACSRULETHEWORLD Tux's lil' helper
Joined: 17 Apr 2004 Posts: 131
|
Posted: Fri Oct 08, 2004 4:01 am Post subject: |
|
|
does anybody know whether this works on PPC? |
|
Back to top |
|
|
Fitzsimmons Guru
Joined: 01 Jan 2003 Posts: 415 Location: Waterloo, Ontario, Canada
|
Posted: Sat Oct 09, 2004 2:58 am Post subject: |
|
|
Wait, I'm confused now.
Is it
or
? |
|
Back to top |
|
|
>Octoploid< n00b
Joined: 27 Jun 2004 Posts: 57
|
Posted: Sat Oct 09, 2004 3:36 am Post subject: |
|
|
Fitzsimmons wrote: | Wait, I'm confused now.
Is it
or
? |
$info ld
(Invocation->Options)
`-O LEVEL'
If LEVEL is a numeric values greater than zero `ld' optimizes the
output. This might take significantly longer and therefore
probably should only be enabled for the final binary. |
|
Back to top |
|
|
aethyr Veteran
Joined: 06 Apr 2003 Posts: 1085 Location: NYC
|
Posted: Sat Oct 09, 2004 5:50 am Post subject: |
|
|
Fitzsimmons wrote: | Wait, I'm confused now.
Is it
or
? |
Sorry, I was being terribly forgetful.
Again, please refer to my first post for instructions. For those that skipped over them to the last page, here again:
Please do read the beginning of the thread for info on how this actually works, or why you might care. |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Tue Oct 12, 2004 12:56 am Post subject: |
|
|
I have the following in my /etc/make.conf:
CFLAGS="-march=pentium3 -mtune=i686 -O2 -funroll-loops -pipe -fno-unit-at-a-time"
LDFLAGS="-Wl,-O1,-z,now"
But I still got the following notice when compiling xorg:
QA Notice: Security risk /usr/X11R6/bin/Xorg. Please consider relinking with 'append-ldflags -Wl,-z,now' to fix.
What have I got wrong? |
|
Back to top |
|
|
aethyr Veteran
Joined: 06 Apr 2003 Posts: 1085 Location: NYC
|
Posted: Tue Oct 12, 2004 1:28 am Post subject: |
|
|
gungholady wrote: | But I still got the following notice when compiling xorg:
QA Notice: Security risk /usr/X11R6/bin/Xorg. Please consider relinking with 'append-ldflags -Wl,-z,now' to fix.
What have I got wrong? |
https://forums.gentoo.org/viewtopic.php?p=1572210#1572210 |
|
Back to top |
|
|
gungholady Guru
Joined: 19 Oct 2003 Posts: 392
|
Posted: Tue Oct 12, 2004 2:19 am Post subject: |
|
|
I guess I missed it when I was trying to read all these pages. |
|
Back to top |
|
|
dalek Veteran
Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Tue Nov 09, 2004 1:33 pm Post subject: |
|
|
Well, I got a error while emerging pam. Found this during my search. I put this in make.conf:
Code: | LDFLAGS='-Wl,-z,now' |
I have AMD rigs. Is that OK? Are these CPU specific?
It did get rid of the error though, for pam. Can I ad something else to make it faster?
What you think?
_________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
|
aethyr Veteran
Joined: 06 Apr 2003 Posts: 1085 Location: NYC
|
Posted: Tue Nov 09, 2004 5:55 pm Post subject: |
|
|
dalek wrote: | Well, I got a error while emerging pam. Found this during my search. I put this in make.conf:
Code: | LDFLAGS='-Wl,-z,now' |
I have AMD rigs. Is that OK? Are these CPU specific?
It did get rid of the error though, for pam. Can I ad something else to make it faster?
What you think? |
I'm not a developer, but I'm pretty sure you can ignore that error message (see the reference I posted [1]). And if you read my first post, you'll see that adding "-Wl,-O1" to your LDFLAGS might speed things up.
[1] https://forums.gentoo.org/viewtopic.php?p=1572210#1572210
or https://bugs.gentoo.org/show_bug.cgi?id=67205 (for more info) |
|
Back to top |
|
|
seank l33t
Joined: 08 Jul 2004 Posts: 686
|
Posted: Fri Nov 12, 2004 4:34 am Post subject: |
|
|
curtis119 wrote: | aethyr,
it seems to me that you could very easily just put a line under the CFLAGS option and it should be passed to gcc. Try it out and let us know if it works. If it does then also let us know if it actually does improve startup times. I have steered clear of prelinking because of all the horror stories I hear on the forum. |
What horror stories? |
|
Back to top |
|
|
bruda Guru
Joined: 06 May 2004 Posts: 376 Location: Sherbrooke, QC, Canada
|
Posted: Tue Nov 16, 2004 4:05 am Post subject: |
|
|
Anybody cares to comment on what SpanKY says in bug 70367 (which does make some sense even if the language is on the rude side--although I believe that his changes should not have a significant effect)?
FWIW the LDFLAGS are not architecture specific as far as I understand things (plus that I am using them on PPC with expected results). _________________ Quid latine dictum sit altum videtur |
|
Back to top |
|
|
aethyr Veteran
Joined: 06 Apr 2003 Posts: 1085 Location: NYC
|
|
Back to top |
|
|
dalek Veteran
Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Tue Nov 16, 2004 4:44 am Post subject: |
|
|
LATINO GENTOO THUG BOI wrote: | Instalé las banderas del ld en mi máquina de la computadora pero ahora es banderas americanas y desea la sangre para el aceite que fue supuesto ser más rápido pero ahora está asumiendo el control Iraq. |
Huh? I did manage to make out Iraq.
Later
_________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
|
Stormy Eyes Veteran
Joined: 09 Apr 2003 Posts: 1064 Location: Watching God spit-shine my boots.
|
Posted: Tue Nov 16, 2004 4:44 am Post subject: |
|
|
LATINO GENTOO THUG BOI wrote: | Instalé las banderas del ld en mi máquina de la computadora pero ahora es banderas americanas y desea la sangre para el aceite que fue supuesto ser más rápido pero ahora está asumiendo el control Iraq. |
Speak English or die, worthless fool. |
|
Back to top |
|
|
dalek Veteran
Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Tue Nov 16, 2004 4:47 am Post subject: |
|
|
Stormy Eyes wrote: | LATINO GENTOO THUG BOI wrote: | Instalé las banderas del ld en mi máquina de la computadora pero ahora es banderas americanas y desea la sangre para el aceite que fue supuesto ser más rápido pero ahora está asumiendo el control Iraq. |
Speak English or die, worthless fool. |
Stormy Eyes, Not so harsh man. I assume we don't know what he said yet. I know I don't. Do you?
Later
_________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Tue Nov 16, 2004 5:11 am Post subject: |
|
|
Stormy Eyes wrote: | LATINO GENTOO THUG BOI wrote: | Instalé las banderas del ld en mi máquina de la computadora pero ahora es banderas americanas y desea la sangre para el aceite que fue supuesto ser más rápido pero ahora está asumiendo el control Iraq. |
Speak English or die, worthless fool. | It means (if I understand it correctly) "I installed LDFLAGS (flags of LD) on my computer (computing machine) buit now it is american flags and it wants blood for that, and is of course, much faster but now is taking control of Iraq."
Um, stop trolling, idiot. _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
|
dalek Veteran
Joined: 19 Sep 2003 Posts: 1353 Location: Mississippi USA
|
Posted: Tue Nov 16, 2004 5:20 am Post subject: |
|
|
I did get the Iraq part right then.
Right for once.
Later
_________________ My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
60TBs of hard drive space using LVM
Cooler Master HAF-932 Case |
|
Back to top |
|
|
bruda Guru
Joined: 06 May 2004 Posts: 376 Location: Sherbrooke, QC, Canada
|
Posted: Tue Nov 16, 2004 2:27 pm Post subject: |
|
|
aethyr wrote: | But it's quite possible vapier may be right. I can only go on what I found other places, and that's the first time I've seen that. Out of curiosity, did it help anything when you changed the flags? |
Yes, and now that I think about it it does make sense (-Wl is a switch introducing linker flags, no?). The howtos should probably be updated. _________________ Quid latine dictum sit altum videtur |
|
Back to top |
|
|
chance2105 Tux's lil' helper
Joined: 10 Jun 2004 Posts: 112 Location: Norman, OK USA
|
Posted: Sat Nov 27, 2004 12:33 am Post subject: |
|
|
Just another 'works for me' post -- recompiling individual apps didn't do much, but re-emerging system (emerge -e system && emerge -e system) made a rather remarkable difference.
I recompiled firefox. Initial run of it was a bit faster, but the real juice came when I ran it a second time when the firefox binary was cached -- the startup time was reduced by at least 60%.
I set my ldflags as to the original poster's suggestion ...
chance |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Wed Dec 15, 2004 6:08 pm Post subject: |
|
|
Added it to my make.conf and did re-emerged firefox, thunderbird, and the new RC2 of Xfce 4.2 and no problems yet I'll do an emerge -e system|world over winter break and see how it goes.Thanks, aethyr _________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
|
codergeek42 Bodhisattva
Joined: 05 Apr 2004 Posts: 5142 Location: Anaheim, CA (USA)
|
Posted: Mon Dec 27, 2004 3:39 am Post subject: |
|
|
For what it's worth, I'm doing a stage 1 chrooted install on another hard drive I have, using ~x86 and these LDFLAGS in my make.conf since before bootstrapping. Not a single problem yet, so far as I can tell. And everything at least *seems* to be snappier. The relevant parts of my make.conf: Quote: | ACCEPT_KEYWORDS="~x86"
CFLAGS="-O2 -march=athlon-tbird -mtune=athlon-tbird -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1" | I'm on package of 84 of 115 of an `emerge -e world` (glibc) right now. I'll let you know how it goes.
_________________ ~~ Peter: Programmer, Mathematician, STEM & Free Software Advocate, Enlightened Agent, Transhumanist, Fedora contributor
Who am I? :: EFF & FSF |
|
Back to top |
|
|
Lokheed Veteran
Joined: 12 Jul 2004 Posts: 1295 Location: /usr/src/linux
|
Posted: Mon Dec 27, 2004 5:24 am Post subject: |
|
|
codergeek42 wrote: | For what it's worth, I'm doing a stage 1 chrooted install on another hard drive I have, using ~x86 and these LDFLAGS in my make.conf since before bootstrapping. Not a single problem yet, so far as I can tell. And everything at least *seems* to be snappier. The relevant parts of my make.conf: Quote: | ACCEPT_KEYWORDS="~x86"
CFLAGS="-O2 -march=athlon-tbird -mtune=athlon-tbird -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1" | I'm on package of 84 of 115 of an `emerge -e world` (glibc) right now. I'll let you know how it goes.
|
I have been reading that it doesnt benefit small packages so that makes me not want to take the time and do an emerge -e world, but I am for sure going to emerge some of the bigger programs and see how they go. BTW, it was due to your sig that I moved to NPTL and havent looked back. One of the best upgrades I have done, maybe even over moving to GCC 3.4, so thanks |
|
Back to top |
|
|
|