Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
New binutils linker (gold)
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
octoploid
n00b
n00b


Joined: 21 Oct 2006
Posts: 65

PostPosted: Tue Mar 25, 2008 6:13 pm    Post subject: New binutils linker (gold) Reply with quote

Ian Lance Taylor released his shiny new linker a few days ago:
http://sourceware.org/ml/binutils/2008-03/msg00162.html

I have been playing with it for a few hours and the speed gains are impressive.

If you want to check the new linker out, simply use the binutils-cvs ebuild
from the loongson overlay: http://www.gentoo-cn.org/gitweb/?p=loongson;a=summary
Add "--enable-gold" to the "myconf" variable in toolchain-binutils.eclass,
to build "gold" instead of the usual GNU ld.

And BTW this is beta software, so beware.
_________________
Myself and mine gymnastic ever
Back to top
View user's profile Send private message
l9ft b9hind
n00b
n00b


Joined: 03 Jul 2005
Posts: 8

PostPosted: Tue Mar 25, 2008 11:15 pm    Post subject: Reply with quote

don't work for me :
ERROR: sys-devel/binutils-9999 failed.
* Call stack:
* ebuild.sh, line 49: Called src_compile
* environment, line 2999: Called toolchain-binutils_src_compile
* environment, line 3535: Called die
* The specific snippet of code:
* "${S}"/configure ${myconf} || die "configure failed";
* The die message:
* configure failed
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-devel/binutils-9999/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/binutils-9999/temp/environment'.
* This ebuild is from an overlay: '/usr/local/portage/'


/var/tmp/portage/sys-devel/binutils-9999/temp/environment: line 3525: cd: /var/tmp/portage/sys-devel/binutils-9999/work/build: Aucun fichier ou rpertoire de ce type

(Aucun fichier ou repertoire ... = No such file or directory )


thanks in advance for your help!
Back to top
View user's profile Send private message
pussi
l33t
l33t


Joined: 08 May 2004
Posts: 727
Location: Finland

PostPosted: Tue Mar 25, 2008 11:48 pm    Post subject: Reply with quote

how big difference does it actually make?
can you give us some benchmarks
Back to top
View user's profile Send private message
kernelOfTruth
Watchman
Watchman


Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world :)

PostPosted: Wed Mar 26, 2008 12:07 am    Post subject: Reply with quote

pussi wrote:
how big difference does it actually make?
can you give us some benchmarks


http://www.pro-linux.de/news/2008/12487.html

Quote:
Der Geschwindigkeitsvorteil soll bei größeren C++-Applikationen bei Faktor fünf liegen.


englisch translation:

Quote:
the speed gain/improvement with big c++-applications is supposed to be around 5


== 5x times speed gains / 1/5th of the time of the old linker :)
_________________
https://github.com/kernelOfTruth/ZFS-for-SystemRescueCD/tree/ZFS-for-SysRescCD-4.9.0
https://github.com/kernelOfTruth/pulseaudio-equalizer-ladspa

Hardcore Gentoo Linux user since 2004 :D
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Wed Mar 26, 2008 12:35 am    Post subject: Reply with quote

Anyone managed to compile and run a kernel with that?

Could be interesting for the daily kde4-svn updates (linking takes a while there) :P
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
octoploid
n00b
n00b


Joined: 21 Oct 2006
Posts: 65

PostPosted: Wed Mar 26, 2008 4:55 am    Post subject: Reply with quote

l9ft b9hind wrote:
don't work for me :
ERROR: sys-devel/binutils-9999 failed.
* Call stack:
* ebuild.sh, line 49: Called src_compile
* environment, line 2999: Called toolchain-binutils_src_compile
* environment, line 3535: Called die
* The specific snippet of code:
* "${S}"/configure ${myconf} || die "configure failed";
* The die message:
* configure failed
*
* If you need support, post the topmost build error, and the call stack if relevant.
* A complete build log is located at '/var/tmp/portage/sys-devel/binutils-9999/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/sys-devel/binutils-9999/temp/environment'.
* This ebuild is from an overlay: '/usr/local/portage/'


/var/tmp/portage/sys-devel/binutils-9999/temp/environment: line 3525: cd: /var/tmp/portage/sys-devel/binutils-9999/work/build: Aucun fichier ou rpertoire de ce type

(Aucun fichier ou repertoire ... = No such file or directory )


I actually copied the cvs.eclass from the overlay to /usr/portage/eclass ...
See: http://r0bertz.blogspot.com/2008/01/live-binutils-ebuild.html

(If you want to retain your old binutils version run "ebuild binutils-9999.ebuild merge".
After that you can use binutils-config to switch between the linkers)

Code:
gentoox2 ~ # ld --version
GNU gold (GNU binutils (GNU Binutils) 2.18.50.20080325) version 1.4
Copyright 2008 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or (at your option) a later version.
This program has absolutely no warranty.

_________________
Myself and mine gymnastic ever
Back to top
View user's profile Send private message
boris64
Veteran
Veteran


Joined: 04 Oct 2003
Posts: 1770
Location: vechelde / peine

PostPosted: Thu Apr 03, 2008 12:17 pm    Post subject: Reply with quote

Is someone actually using this? Is there another possibility to install
the new "gold" enabled binutils without using one of these *-9999 ebuilds?
Does everything (compiling world for example) work out-of-the-box?
_________________
boris64.net 200x / visit my desktop / try these tiny kernel patches ;)
Back to top
View user's profile Send private message
octoploid
n00b
n00b


Joined: 21 Oct 2006
Posts: 65

PostPosted: Thu Apr 03, 2008 12:31 pm    Post subject: Reply with quote

boris64 wrote:
Is someone actually using this? Is there another possibility to install
the new "gold" enabled binutils without using one of these *-9999 ebuilds?
Does everything (compiling world for example) work out-of-the-box?


»Gold« (acronym for "google ld"?) is pretty experimental right now. It does not work out-of-the-box for every ebuild.
Indeed it does often fail, because it implements only a subset of the ld options. (Linking the kernel also fails.)

So this is more for people working on e.g. large C++ projects, where a 5-6 time reduction in link time comes handy...

(Here is a nice article about gold: http://lwn.net/Articles/274859/ )
_________________
Myself and mine gymnastic ever
Back to top
View user's profile Send private message
boris64
Veteran
Veteran


Joined: 04 Oct 2003
Posts: 1770
Location: vechelde / peine

PostPosted: Thu Apr 03, 2008 4:25 pm    Post subject: Reply with quote

Thanks for making things a bit more clear.

If it does not even (yet) link the kernel, it might be a
bit too experimental for a test penguin like me.
_________________
boris64.net 200x / visit my desktop / try these tiny kernel patches ;)
Back to top
View user's profile Send private message
Seppel
Tux's lil' helper
Tux's lil' helper


Joined: 10 Nov 2002
Posts: 113

PostPosted: Fri Apr 04, 2008 10:58 am    Post subject: Reply with quote

boris64 wrote:
Thanks for making things a bit more clear.

If it does not even (yet) link the kernel, it might be a
bit too experimental for a test penguin like me.


Why do you want to link the kernel with gold? Linking the kernel is more sophisticated than standard software and linking it with the traditional ld is fast enough.
Back to top
View user's profile Send private message
shazow
Apprentice
Apprentice


Joined: 11 Dec 2003
Posts: 176
Location: Canada, Ontario

PostPosted: Sun Apr 06, 2008 4:56 pm    Post subject: Reply with quote

An official announcement on the Google Open Source Blog:
http://google-opensource.blogspot.com/2008/04/gold-google-releases-new-and-improved.html
Back to top
View user's profile Send private message
alex.blackbit
Advocate
Advocate


Joined: 26 Jul 2005
Posts: 2397

PostPosted: Tue Dec 23, 2008 1:20 am    Post subject: anyone tried the gold linker of binutils? Reply with quote

hi,

did anyone? i wonder if a significant change is visible.
http://en.wikipedia.org/wiki/Gold_%28linker%29
it is included in the tar ball of binutils, and can be built quite easily, but you can only build one linker, the classical one or gold.
when i'm in the mood i will modify the applying eclass and will give it a try.
it somebody already made experiences, please share them.
Back to top
View user's profile Send private message
gringo
Advocate
Advocate


Joined: 27 Apr 2003
Posts: 3793

PostPosted: Tue Dec 23, 2008 8:36 am    Post subject: Reply with quote

there was a thread some time ago about it but haven´t tried myself :

https://forums.gentoo.org/viewtopic-t-680006-highlight-gold.html

just in case you haven´t seen it.

cheers
_________________
Error: Failing not supported by current locale
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sun May 10, 2009 4:16 pm    Post subject: Reply with quote

I just notice the "gold" useflag in binutils yesterday. I take it that since it was included on a stable version of binutils, that it is safe to use?

Comments/Concerns???
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1193
Location: Motown

PostPosted: Sun May 10, 2009 4:20 pm    Post subject: Reply with quote

overkll wrote:
I just notice the "gold" useflag in binutils yesterday. I take it that since it was included on a stable version of binutils, that it is safe to use?

Comments/Concerns???


I'm guessing it may be but there are some problems. I couldn't configure glibc after building binutils w/gold see: https://bugs.gentoo.org/show_bug.cgi?id=269274.
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
overkll
Veteran
Veteran


Joined: 21 Sep 2004
Posts: 1249
Location: Austin, Texas

PostPosted: Sun May 10, 2009 5:00 pm    Post subject: Reply with quote

Thanks. I think I'll avoid it for now.
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1137
Location: Sofia/Bulgaria

PostPosted: Mon May 11, 2009 5:03 pm    Post subject: Reply with quote

binutils + gold = glibc and grub2 failed during configure stage
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
darkphader
Veteran
Veteran


Joined: 09 May 2002
Posts: 1193
Location: Motown

PostPosted: Mon May 11, 2009 5:06 pm    Post subject: Reply with quote

All of these fail as well:

dev-libs/libgcrypt-1.4.4
sys-process/procps-3.2.7
media-libs/alsa-lib-1.0.20
sys-libs/libcap-2.16
sys-apps/busybox-1.13.4
sys-apps/sandbox-1.9
sys-apps/openrc-0.4.3-r2
sys-libs/db-4.7.25_p3
_________________
WYSIWYG - What You See Is What You Grep
Back to top
View user's profile Send private message
Kollin
Veteran
Veteran


Joined: 25 Feb 2006
Posts: 1137
Location: Sofia/Bulgaria

PostPosted: Mon May 11, 2009 5:15 pm    Post subject: Reply with quote

darkphader wrote:
All of these fail as well:

dev-libs/libgcrypt-1.4.4
sys-process/procps-3.2.7
media-libs/alsa-lib-1.0.20
sys-libs/libcap-2.16
sys-apps/busybox-1.13.4
sys-apps/sandbox-1.9
sys-apps/openrc-0.4.3-r2
sys-libs/db-4.7.25_p3


Thats it. Back in the closet for "gold" :wink:
_________________
"Dear Enemy: may the Lord hate you and all your kind, may you be turned orange in hue, and may your head fall off at an awkward moment."
"Linux is like a wigwam - no windows, no gates, apache inside..."
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6625

PostPosted: Sat Jul 04, 2009 1:19 pm    Post subject: Reply with quote

I've just tried enabling gold on a fresh installation out of curiosity, and now binutils can't even compile itself let alone anything else... whoops :lol:
Back to top
View user's profile Send private message
cruzki123
Apprentice
Apprentice


Joined: 16 May 2008
Posts: 256

PostPosted: Mon Jul 06, 2009 1:32 pm    Post subject: Reply with quote

Ant_P wrote:
I've just tried enabling gold on a fresh installation out of curiosity, and now binutils can't even compile itself let alone anything else... whoops :lol:


I have the same problem in a x86 chroot I have :(

I think gold use flags should be masked :S
Back to top
View user's profile Send private message
Yamakuzure
Advocate
Advocate


Joined: 21 Jun 2006
Posts: 2277
Location: Bardowick, Germany

PostPosted: Mon Jul 06, 2009 2:35 pm    Post subject: Reply with quote

If you did not set "optimized" LDFLAGS in your make.conf, you can compile (nearly) everything. If I remember right (It's been some weeks since I tried it), *gold* does not understand "-Wl,--sort-common", "-Wl,--hash-style=gnu", "-Wl,-O1" and "-Wl,z,now".
Just use "ld --help" and you see what can use. Everything in your LDFLAGS not in that list isn't supported and needs to be taken out of the flags before you can re-compile your binutils with "-gold" again. (Otherwise configure will fail)
_________________
Important German:
  1. "Aha" - German reaction to pretend that you are really interested while giving no f*ck.
  2. "Tja" - German reaction to the apocalypse, nuclear war, an alien invasion or no bread in the house.
Back to top
View user's profile Send private message
seqizz
Tux's lil' helper
Tux's lil' helper


Joined: 14 Jan 2008
Posts: 103

PostPosted: Mon Jul 06, 2009 3:31 pm    Post subject: :\ Reply with quote

Yamakuzure wrote:
If you did not set "optimized" LDFLAGS in your make.conf, you can compile (nearly) everything. If I remember right (It's been some weeks since I tried it), *gold* does not understand "-Wl,--sort-common", "-Wl,--hash-style=gnu", "-Wl,-O1" and "-Wl,z,now".
Just use "ld --help" and you see what can use. Everything in your LDFLAGS not in that list isn't supported and needs to be taken out of the flags before you can re-compile your binutils with "-gold" again. (Otherwise configure will fail)

Thank you for this! :) i've been looking desperately to the terminal, which says.. "checking for C compiler default output file name... configure: error: C compiler cannot create executables"..
:mrgreen:
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6625

PostPosted: Mon Jul 06, 2009 7:34 pm    Post subject: Reply with quote

What about -Wl,--as-needed, or is it the whole -Wl thing that's not supported?
Back to top
View user's profile Send private message
cruzki123
Apprentice
Apprentice


Joined: 16 May 2008
Posts: 256

PostPosted: Tue Jul 07, 2009 12:26 pm    Post subject: Reply with quote

I tryed remove LDFLAGS before and don't work.

Code:
artemisa / # LDFLAGS="" USE=-gold emerge -1 binutils -va

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild     U ] sys-devel/binutils-2.19.51.0.10 [2.19.51.0.4] USE="nls -gold* -multislot -multitarget -test -vanilla" 0 kB

Total: 1 package (1 upgrade), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] y
>>> Verifying ebuild manifests                   
>>> Emerging (1 of 1) sys-devel/binutils-2.19.51.0.10
>>> Failed to emerge sys-devel/binutils-2.19.51.0.10, Log file:
>>>  '/var/tmp/portage/sys-devel/binutils-2.19.51.0.10/temp/build.log'
>>> Jobs: 0 of 1 complete, 1 failed                 Load avg: 0.78, 0.44, 0.21
>>> Unpacking source...                                                       
>>> Unpacking binutils-2.19.51.0.10-patches-1.0.tar.bz2 to /var/tmp/portage/sys-devel/binutils-2.19.51.0.10/work
>>> Unpacking binutils-2.19.51.0.10.tar.bz2 to /var/tmp/portage/sys-devel/binutils-2.19.51.0.10/work           
 * Applying various patches (bugfixes/updates) ...                                                             
 *   03_all_binutils-2.15.92.0.2-ppc64-pie.patch ...                      [ ok ]                               
 *   08_all_binutils-RPATH_ENVVAR-smack.patch ...                         [ ok ]                               
 *   12_all_sh-targets.patch ...                                          [ ok ]                               
 *   42_all_012_check_ldrunpath_length.patch ...                          [ ok ]                               
 *   63_all_binutils-2.18-pt-pax-flags-20070828.patch ...                 [ ok ]                               
 *   65_all_binutils-2.18-amd64-32bit-path.patch ...                      [ ok ]                               
 *   66_all_binutils-2.18.50.0.2-warn-textrel.patch ...                   [ ok ]                               
 *   76_all_use-new-ld-dtags.patch ...                                    [ ok ]                               
 *   77_all_document-new-dtags-behaviour.patch ...                        [ ok ]                               
 *   77_all_generate-gnu-hash.patch ...                                   [ ok ]                               
 *   78_all_use-relro.patch ...                                           [ ok ]                               
 *   91_all_libiberty-pic.patch ...                                       [ ok ]                               
 * Done with patching                                                                                           
 * Fixing misc issues in configure files                                                                       
 * Using GNU config files from /usr/share/libtool                                                               
 *   Updating config.sub                                                  [ ok ]                               
 *   Updating config.guess                                                [ ok ]                               
 * Running elibtoolize in: binutils-2.19.51.0.10                                                               
 *   Applying install-sh-1.5.4.patch ...                                                                       
 *   Applying portage-2.2.patch ...                                                                             
 *   Applying sed-1.5.6.patch ...                                                                               
 *   Applying as-needed-2.2.6.patch ...                                                                         
>>> Source unpacked in /var/tmp/portage/sys-devel/binutils-2.19.51.0.10/work                                   
>>> Compiling source in /var/tmp/portage/sys-devel/binutils-2.19.51.0.10/work/binutils-2.19.51.0.10 ...         

 *  CATEGORY: sys-devel
 *    CBUILD: i686-pc-linux-gnu
 *     CHOST: i686-pc-linux-gnu
 *   CTARGET: i686-pc-linux-gnu
 *    CFLAGS:  -O2 -pipe -march=core2
 *   LDFLAGS:                       

./configure --prefix=/usr --host=i686-pc-linux-gnu --target=i686-pc-linux-gnu --datadir=/usr/share/binutils-data/i686-pc-linux-gnu/2.19.51.0.10 --infodir=/usr/share/binutils-data/i686-pc-linux-gnu/2.19.51.0.10/info --mandir=/usr/share/binutils-data/i686-pc-linux-gnu/2.19.51.0.10/man --bindir=/usr/i686-pc-linux-gnu/binutils-bin/2.19.51.0.10 --libdir=/usr/lib/binutils/i686-pc-linux-gnu/2.19.51.0.10 --libexecdir=/usr/lib/binutils/i686-pc-linux-gnu/2.19.51.0.10 --includedir=/usr/lib/binutils/i686-pc-linux-gnu/2.19.51.0.10/include --enable-64-bit-bfd --enable-shared --disable-werror --disable-gold --without-included-gettext --build=i686-pc-linux-gnu --enable-secureplt                                                 
checking build system type... i686-pc-linux-gnu                                                                                                                                     
checking host system type... i686-pc-linux-gnu                                                                                                                                     
checking target system type... i686-pc-linux-gnu                                                                                                                                   
checking for a BSD-compatible install... /usr/bin/install -c                                                                                                                       
checking whether ln works... yes                                                                                                                                                   
checking whether ln -s works... yes                                                                                                                                                 
checking for i686-pc-linux-gnu-gcc... i686-pc-linux-gnu-gcc                                                                                                                         
checking for C compiler default output file name... configure: error: in `/var/tmp/portage/sys-devel/binutils-2.19.51.0.10/work/build':
configure: error: C compiler cannot create executables
See `config.log' for more details.


I think that the problem was that I compiled binutils with custom LDFLAGS and USE=gold.

PS: It is posible that the problem was the standar LDFLAGS used by gentoo?[/code]
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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