Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Are we missing some easy optimizations (LDFLAGS)?
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo Chat
View previous topic :: View next topic  
Author Message
placeholder
Advocate
Advocate


Joined: 07 Feb 2004
Posts: 2500

PostPosted: Thu Sep 23, 2004 8:27 pm    Post subject: Reply with quote

Jefklak: You should have tested each more than once and then take an average. It may have been around the same value.
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2019
Location: Earth

PostPosted: Thu Sep 23, 2004 9:45 pm    Post subject: Reply with quote

so far, so good. Everything has compiled fine, no change in memory usage, programs have compiled within same time frame as without LDFLAGS, programs launch noticably faster.

We'll see how it handles firefox.
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Thu Sep 23, 2004 10:06 pm    Post subject: Reply with quote

/me starts emerge -e world on laptop and fileserver

bring it on!

[edit]:
tachyon simon # emerge -e world
Calculating world dependencies ...done!
>>> emerge (1 of 439) sys-devel/patch-2.5.9 to /

oh dear...
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
ciaranm
Retired Dev
Retired Dev


Joined: 19 Jul 2003
Posts: 1719
Location: In Hiding

PostPosted: Thu Sep 23, 2004 11:04 pm    Post subject: Reply with quote

You really shouldn't tinker with LDFLAGS unless you know what you're doing... Great way to introduce all sorts of breakages and fun local root holes if you screw up... You have been warned :twisted:
Back to top
View user's profile Send private message
ender11782
n00b
n00b


Joined: 10 Aug 2004
Posts: 31

PostPosted: Fri Sep 24, 2004 1:21 am    Post subject: Reply with quote

Ok, adding LDFLAGS="-W1, -O1" produced the following error:

Code:
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

!!! ERROR: app-office/openoffice-1.1.2 failed.
!!! Function src_compile, Line 317, Exitcode 77
!!! (no error message)


also applies to something-lib as well (don't remember what it was I was emerging earlier...) Commenting out LDFLAGS makes the error go away.

Any idea why this would happen?
Back to top
View user's profile Send private message
aethyr
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1085
Location: NYC

PostPosted: Fri Sep 24, 2004 1:53 am    Post subject: Reply with quote

Well, first off it's "-Wl,-O1" (an L, and no space).

I assume that error occured during the configuration phase? I really don't have the time or the space to compile OpenOffice from start to finish, but I did test the ./configure part of the build:

Code:
checking for gawk... gawk
checking for gawk... /bin/gawk
checking for sed... /bin/sed
checking the operating system... checked (Linux)
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for gcc... /usr/bin/gcc
checking the GNU gcc compiler version... checked (gcc 3.3.4)
.......


Works fine here. Again, make sure you're using the correct LDFLAGS. If that doesn't work, check your /var/tmp/portage/openoffice-1.1.2/work/oo_1.1.2_src/config_office/config.log file.
Back to top
View user's profile Send private message
TheCoop
Veteran
Veteran


Joined: 15 Jun 2002
Posts: 1814
Location: Where you least expect it

PostPosted: Fri Sep 24, 2004 8:18 am    Post subject: Reply with quote

ciaranm wrote:
You really shouldn't tinker with LDFLAGS unless you know what you're doing... Great way to introduce all sorts of breakages and fun local root holes if you screw up... You have been warned :twisted:

It wouldnt be gentoo if you didnt break something :P
_________________
95% of all computer errors occur between chair and keyboard (TM)

"One World, One web, One program" - Microsoft Promo ad.
"Ein Volk, Ein Reich, Ein Führer" - Adolf Hitler

Change the world - move a rock
Back to top
View user's profile Send private message
stahlsau
Guru
Guru


Joined: 09 Jan 2004
Posts: 565
Location: WildWestwoods

PostPosted: Fri Sep 24, 2004 8:40 am    Post subject: Reply with quote

ok, I´m ready with "emerge -e world". No problems so far, but i´ve noticed some programs are starting faster. Nice!

System:
Linux eisenschwein 2.6.9-rc2 #1 Wed Sep 22 19:58:55 UTC 2004 i686 AMD Athlon(tm) XP 2400+ AuthenticAMD GNU/Linux

Portage 2.0.51_rc1 (default-x86-2004.2, gcc-3.4.2, glibc-2.3.4.20040808-r0, 2.6.9-rc2 i686)
ACCEPT_KEYWORDS="x86 ~x86"
CFLAGS="-march=athlon-xp -Os -pipe -mfpmath=sse -fomit-frame-pointer -funroll-loops -m3dnow -mmmx -msse -ftracer -fweb"
CHOST="i686-pc-linux-gnu"
COMPILER=""
FEATURES="autoaddcvs ccache sandbox"
MAKEOPTS="-j2"
USE="3dfx 3dnow X alsa apm avi berkdb bitmap-fonts cdr crypt cups divx4linux encode foomaticdb gdbm gif gimpprint gpm gtk gtk2 icq imlib java jpeg libg++ libwww mmx motif mozilla moznocompose moznoirc moznomail moznoxft mpeg ncurses nls nptl offensive opengl pam pdflib perl pic png ppds python qt quicktime readline samba sdl slang ssl svga tcpd tetex truetype x86 xml2 xmms xprint xv zlib linguas_de"

LDFLAGS="-Wl,-O1"
_________________
Join the adopt an unanswered post initiative today
Back to top
View user's profile Send private message
Jefklak
l33t
l33t


Joined: 26 Oct 2003
Posts: 818
Location: Belgium

PostPosted: Fri Sep 24, 2004 10:58 am    Post subject: Reply with quote

Pwnz3r wrote:
Jefklak: You should have tested each more than once and then take an average. It may have been around the same value.


I did that.
_________________
{Linux User #333296}
Kernel 2.6.9-nitro4!
<< hurrah
Back to top
View user's profile Send private message
Ruzbeh
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 223

PostPosted: Fri Sep 24, 2004 4:06 pm    Post subject: Reply with quote

Ok, so if I use this, I could break a program compiled with LDFLAGS? Or if I use LDFLAGS with a program, I could break the entire system? 8O

Well I'm going to compile Firefox with these LDFLAGS, let's hope it works out. ;)
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 657
Location: The Holy city of Honolulu

PostPosted: Fri Sep 24, 2004 6:05 pm    Post subject: Reply with quote

Entire world was rebuilt with it..... no problems at all.

So ... it's safe enough imo
_________________
http://howdovaccinescauseautism.com/
auf alten Schiffen lernt man Segeln.
YOU'RE NOT A LIBERAL!
Back to top
View user's profile Send private message
dangle
n00b
n00b


Joined: 15 May 2004
Posts: 22
Location: Adelaide, AU

PostPosted: Sat Sep 25, 2004 1:49 am    Post subject: Reply with quote

aethyr wrote:


More results from gftp. Startup time went from around 0.65s to just under 0.6s, a savings of 0.5s! ;)



err... savings of .05 seconds mebbe? ;)
Back to top
View user's profile Send private message
aethyr
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1085
Location: NYC

PostPosted: Sat Sep 25, 2004 6:55 am    Post subject: Reply with quote

dangle wrote:
aethyr wrote:


More results from gftp. Startup time went from around 0.65s to just under 0.6s, a savings of 0.5s! ;)



err... savings of .05 seconds mebbe? ;)


Obviously :)
Back to top
View user's profile Send private message
ender11782
n00b
n00b


Joined: 10 Aug 2004
Posts: 31

PostPosted: Sat Sep 25, 2004 7:31 am    Post subject: Reply with quote

aethyr wrote:
Well, first off it's "-Wl,-O1" (an L, and no space).


Color me pwned.

Compiling is still broken though (when using intended LDFLAGS). This time it was while emerging "sudo". I checked the config.log, but it was all gobbledy-gook to me; anything in particular I should be looking for?
Back to top
View user's profile Send private message
Skraut
Tux's lil' helper
Tux's lil' helper


Joined: 23 Feb 2003
Posts: 142
Location: Norwalk, OH, USA, Earth, Solar System, Milky Way, Virgo Supercluster, Known Universe

PostPosted: Mon Sep 27, 2004 3:05 pm    Post subject: Reply with quote

Just logged into Gnome on my new system that went from bootstrap to desktop with these LFLAGS set.

The system was really ailing so everything is a lot faster, though I don't know how much of that speed is just from the old system being so messed up.

Just wanted people to know they were safe...
_________________
__
If you play a Windows CD backwards you can hear demonic voices... Played forward it does something even more terrifying... It installs Windows.
Back to top
View user's profile Send private message
sindre
Guru
Guru


Joined: 01 Nov 2002
Posts: 315
Location: Norway

PostPosted: Mon Sep 27, 2004 4:20 pm    Post subject: Reply with quote

emerged -e world with
Code:
LDFLAGS="-Wl,-O1 -Wl,--relax -Wl,--enable-new-dtags -Wl,--sort-common"
No problems seen yet. System seems faster, but it's really hard to tell whether I'm imagining it or not.
Back to top
View user's profile Send private message
yoosty69
n00b
n00b


Joined: 03 Jan 2004
Posts: 35

PostPosted: Tue Sep 28, 2004 3:59 am    Post subject: Reply with quote

Holy crap!
Eterm is so much better now!
*PHEW!*
I was just wondering how I was going to switch to Aterm, but forget that!

LDFLAGS="-Wl,-O1 -Wl,-z,lazy -Wl,-z,combreloc -Wl,--enable-new-dtags"

ok ok, so it's not 1000x faster or anything, but opening a bunch of these things one one desktop used to B a strain, now not so much! SHWEEET!
_________________
-> p00t <-
Back to top
View user's profile Send private message
aethyr
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1085
Location: NYC

PostPosted: Tue Sep 28, 2004 5:24 am    Post subject: Reply with quote

Careful with the flags guys, I hope this doesn't turn into another CFLAGS debacle...

Anyways, "-z combreloc" and "-z lazy" are unneeded, since I believe they are set by default, and "--relax" isn't supported on x86 (as far as I can tell). The only flag out of the ones you have used that would actually do anything, "--enable-new-dtags", is unproven in regards to distro-wide testing like "-O1" has received with Ubuntu, so just be cautious.
Back to top
View user's profile Send private message
gabe-kai
n00b
n00b


Joined: 03 Sep 2003
Posts: 63
Location: Michigan, USA

PostPosted: Wed Sep 29, 2004 5:20 am    Post subject: Reply with quote

Attempting a Stage 1 install now... I'll let you know how it goes. This system is going to run ultra-light. Xorg, Fvwm, OOo, Firefox, Rox, and GNU Chess. Here is my make.conf
Code:
CFLAGS="-O3 -march=athlon-xp -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1"
MAKEOPTS="-j4"
FEATURES="userpriv usersandbox distcc"
USE="-* 3dnow alsa apic cdr cups fbcon graphviz javascript lcms mmx nptl \
pic sse stroke tcltk tiff threads truetype wmf"

_________________
"People demand freedom of speech to make up for the freedom of thought which they avoid."
- Soren Aabye Kierkegaard
Back to top
View user's profile Send private message
Muso
l33t
l33t


Joined: 22 Oct 2002
Posts: 657
Location: The Holy city of Honolulu

PostPosted: Wed Sep 29, 2004 6:32 am    Post subject: Reply with quote

Code:
CFLAGS="-O2 -march=athlon-xp -pipe -funroll-loops -fomit-frame-pointer"
LDFLAGS="-Wl,-O1"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
MAKEOPTS="-j2"
ACCEPT_KEYWORDS="~x86"
PORTDIR_OVERLAY=/usr/local/portage
FEATURES="ccache"
CCACHE_SIZE="2G"
USE="nptl xprint gtk gtk2 X xv opengl openal firebird imlib alsa -qt -gnome -kde -arts png flash java ruby perl offensive gif jpeg xmms avi canna cdr cups curl curlwrappers dbase directfb fam ftp joystick mpeg ncurses quicktime ssl usb videos tiff"

_________________
http://howdovaccinescauseautism.com/
auf alten Schiffen lernt man Segeln.
YOU'RE NOT A LIBERAL!
Back to top
View user's profile Send private message
tspse
n00b
n00b


Joined: 22 Aug 2003
Posts: 34
Location: Stockholm, Sweden

PostPosted: Wed Sep 29, 2004 1:14 pm    Post subject: Reply with quote

i did and install with this, (stage 1)
Quote:
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium2 -O3 -pipe -fomit-frame-pointer"
CXXFLAGS="-march=pentium2 -O3 -pipe -fomit-frame-pointer"
USE="crypt curl curlwrappers -gtk -gtk2 -gnome -kde jpeg -mozilla mysql php png sasl openssl apache2 -apache -arts -alsa -X -qt -cups perl -mpeg -spell java"
LDFLAGS="-Wl,-O1"


Went smoothly, and i can say, my server runs really great
_________________
"The glue that holds all relationships together -- including the relationship between the leader and the led is trust, and trust is based on integrity."
Back to top
View user's profile Send private message
aethyr
Veteran
Veteran


Joined: 06 Apr 2003
Posts: 1085
Location: NYC

PostPosted: Fri Oct 01, 2004 7:34 pm    Post subject: Reply with quote

Out of curiosity, has anyone built KDE with these flags? I only know examples of people using it to rebuild GNOME.

Solar expressed in the bug report that
Quote:
"last [he] knew KDE/QT had some problems respecting any LDFLAGS. (mixed results)".

I'm curious what people's experiences have been.

Thanks.
Back to top
View user's profile Send private message
sindre
Guru
Guru


Joined: 01 Nov 2002
Posts: 315
Location: Norway

PostPosted: Fri Oct 01, 2004 9:06 pm    Post subject: Reply with quote

aethyr wrote:
Out of curiosity, has anyone built KDE with these flags? I only know examples of people using it to rebuild GNOME.

Solar expressed in the bug report that
Quote:
"last [he] knew KDE/QT had some problems respecting any LDFLAGS. (mixed results)".

I'm curious what people's experiences have been.

Thanks.
I even edited the qt ebuild to make it use my CXXFLAGS and LDFLAGS, kde used them automatically. No problems yet.
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2019
Location: Earth

PostPosted: Fri Oct 01, 2004 11:34 pm    Post subject: Reply with quote

aethyr wrote:
Out of curiosity, has anyone built KDE with these flags? I only know examples of people using it to rebuild GNOME.

Solar expressed in the bug report that
Quote:
"last [he] knew KDE/QT had some problems respecting any LDFLAGS. (mixed results)".

I'm curious what people's experiences have been.

Thanks.


no problems here. running kde3.3.0.

sindre wrote:
I even edited the qt ebuild to make it use my CXXFLAGS and LDFLAGS, kde used them automatically. No problems yet.


What did you add/edit in the qt ebuild?
Back to top
View user's profile Send private message
sindre
Guru
Guru


Joined: 01 Nov 2002
Posts: 315
Location: Norway

PostPosted: Fri Oct 01, 2004 11:53 pm    Post subject: Reply with quote

Ateo wrote:
What did you add/edit in the qt ebuild?

I added
Code:
sed -i "s:= -O2:= ${CXXFLAGS}:g" ${S}/mkspecs/linux-g++/qmake.conf
under src_unpack() for the CXXFLAGS.

For the LDFLAGS I actually paused (ctrl-z) the emerge-process after it finished unpacking, and edited /var/tmp/portage/qt-3.3.3-r1/work/qt-x11-free-3.3.3/mkspecs/linux-g++/qmake.conf manually. I think I added my LDFLAGS to LFLAGS_RELEASE or something like that.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo Chat All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 3 of 8

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum