chiark / gitweb /
build-sys: default to gold linker
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 22 Jan 2014 01:38:49 +0000 (20:38 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 25 Jan 2014 23:10:08 +0000 (18:10 -0500)
gold doesn't exhibit the problems with linking of compatibility
libraries.

It is also slightly faster:

make clean && make -j5   bfd       gold

real                   34.885s     33.707s
user                   34.486s     32.189s
sys                    9.929s      10.845s

real                   35.128s     33.508s
user                   34.660s     31.858s
sys                    10.798s     10.341s

real                   35.405s     33.748s
user                   34.765s     32.384s
sys                    11.635s     10.998s

real                   35.250s     33.795s
user                   34.704s     32.253s
sys                    11.220s     11.469s

touch src/libsystemd/sd-bus.c && make -j5
                        bfd        gold

real                   10.224s      9.030s
user                   11.664s      9.877s
sys                    3.431s       2.878s

real                   10.021s      9.165s
user                   11.526s      9.990s
sys                    3.061s       3.015s

real                   10.233s      8.961s
user                   11.657s      9.973s
sys                    3.467s       2.202s

real                   10.160s      9.086s
user                   11.637s      9.950s
sys                    3.188s       2.859s

README
configure.ac

diff --git a/README b/README
index 0548e6a..509b45f 100644 (file)
--- a/README
+++ b/README
@@ -108,6 +108,8 @@ REQUIREMENTS:
         libpython (optional)
         make, gcc, and similar tools
 
+        To sucessfully use --compat-libs, gcc >= 4.8 seems necessary.
+
         During runtime, you need the following additional
         dependencies:
 
index 939ba6d..6c1ba7c 100644 (file)
@@ -175,7 +175,8 @@ CC_CHECK_FLAGS_APPEND([with_ldflags], [LDFLAGS], [\
         -Wl,--no-undefined \
         -Wl,--gc-sections \
         -Wl,-z,relro \
-        -Wl,-z,now])
+        -Wl,-z,now \
+        -Wl,-fuse-ld=gold])
 AC_SUBST([OUR_LDFLAGS], "$with_ldflags $address_sanitizer_ldflags")
 
 AC_CHECK_SIZEOF(pid_t)