Google's Linux kernel team has found several cases where the gold
linker does not correctly link kernel modules, resulting in computers
that do not start up correctly. Thus it it recommended that Chromium
developers who previously ran install-build-deps.sh and set gold as
/usr/bin/ld undo this change:
1. Sync src/build/install-build-deps.sh to r100802.
2. Run src/build/install-build-deps.sh again:
- install-build-deps.sh will ask you to restore /usr/bin/ld.orig to /usr/bin/ld
- install-build-deps.sh will re-install gold to /usr/local/gold/bin,
with ld.bfd as well so NaCl links correctly.
3. To continue using gold in future builds, you need to set the CXX
environment variable to "g++ -B/usr/local/gold/bin".
- e.g. CXX="g++ -B/usr/local/gold/bin" make BUILDTYPE=Debug chrome
- TODO: Add a gyp flag so developers don't have to do this manually.
http://crbug.com/96358
If you run into any issues, please let me know.
- Lei
upstream gcc-4.5+ and Debian's (and Goobuntu's) gcc-4.4+ support
-fuse-ld=gold (in CFLAGS/CXXFLAGS) so that you dont have to go
touching /usr/bin/ld ...
-mike
How does that find gold? The version shipped by Ubuntu doesn't work,
so we'd need it to find our build of it.
it should search $PATH for `gold`
also, i was semi-mistaken. i thought this went upstream, but it seems
it never made it out of Debian. so only Debian/Ubuntu/Goobuntu will
support this option.
-mike
I don't see how that works. Most binutils-gold packages install gold
as /usr/bin/ld. e.g.
http://packages.debian.org/squeeze/i386/binutils-gold/filelist
yes, the older binutils releases did that. they've moved on to
installing in parallel (ld.bfd and ld.gold). so to make things work
with the older releases on Debian/Goobuntu, you'd have to undo the
ld->ld.bfd-link diversion manually.
-mike
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
This seems to do what I'd want:
$ export PATH=`pwd`:$PATH
$ echo 'exit 1' >> ld; chmod +x ld
$ echo 'int main() {}' > test.c
$ gcc test.c
collect2: ld returned 1 exit status
Unfortunately, if goma is providing that gcc, it doesn't work right.
I am not clear on how goma decides which ld to run. (I tried
restarting goma after modifying my path but it still found the wrong
one.)
--
tl;dr: If you get kernel oops after a recent driver update, restore
ld.bfd as default linker, then re-install the driver modules.
--Szymon