This is to address https://bugs.webkit.org/show_bug.cgi?id=229618#c10.
Created attachment 437125 [details] proposed patch.
Thanks for the patch! I'm going to give it a try on Ubuntu 18.04.
I tried landing a speculative change. https://github.com/WebKit/WebKit/commit/ed75252f8730bd3006fe76456f427e9b307c43ba @Diago Can you change the buildbot to generate more error messages from ld?
I tested Mark's patch on Ubuntu 18.04 and it built fine. After that, I reverted the patch and tested the speculative main with the speculative fix. It built too. I've triggered a clean build in the bot and I've also increased the verbosity of ld.gold.
Link to the Ubuntu 18.04 build including the speculative fix https://build.webkit.org/#/builders/71/builds/224
There's currently an issue in the bot (it's failing on "jhbuild" step). I stopped the bot temporarily and I'm building manually.
I confirm Yusuke's patch fixes compilation in Ubuntu 18.04, so this patch is not actually needed. Thank you Mark anyway.