small development tip: Consider using the gold linker

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: small development tip: Consider using the gold linker
Date: 2018-07-09 23:40:14
Message-ID: 20180709234014.x77yobrrkz4tebbt@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

FWIW, I've lately noticed that I spend a fair time waiting for the
linker during edit-compile-test cycles. Due to an independent issue I
just used the gold linker, and the speedup is quite noticable.

Just relinking the backend, without rebuilding anything else, goes from
0m3.975s to 0m1.585s. Given ccache commonly prevents actually having to
recompile files, that works out to a noticable benefit.

For me just adding '-fuse-ld=gold' to CFLAGS works.

Unfortunately I get some spurious warnings, but I hope that's just a
debian unstable issue: /usr/bin/ld.gold: warning: discarding version
information for __cxa_finalize(at)GLIBC_2(dot)2(dot)5, defined in unused shared
library /lib/x86_64-linux-gnu/libc.so.6 (linked with --as-needed)

Greetings,

Andres Freund

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2018-07-09 23:43:16 Re: Usage of epoch in txid_current
Previous Message Thomas Munro 2018-07-09 23:35:59 Re: Usage of epoch in txid_current