AOSC-Archive / autobuild3

AOSC OS package maintenance toolkit (version 3)
https://aosc.io
GNU General Public License v2.0
24 stars 17 forks source link

Add experimental support for alternative LDs. #30

Open Artoria2e5 opened 9 years ago

Artoria2e5 commented 9 years ago

There are two ELF-only non-regular-ld's that may be somehow better than the original one. Both are somehow experimental, but personally I think gold is closer to everyday use.

gold from binutils

gold the linker is a part of binutils, and it's nearly 10x faster than ld. Using gold for LTO builds can make gcc use the plugin features better.

Note that the description for the -O stuff in gold manpage is ‘Optimize output file size’.

gold is a drop-in replacement for ld for normal use (README).

eu-ld from elfstrip

This one seems to support less flags with a much-shorter --help output, so I'm not sure if it will work well as a drop-in (and there is no further documentation!). It's listed here actually for some kind of religion-like belief that elfutils is better.

It seems that it treats -O more carefully somehow (ldgeneric.c: optimal_bucket_size does some extra loops with higher level). Well just pretend that you can't see the XXX in optimal_gnu_hash_size.

Issue Metadata

Artoria2e5 commented 9 years ago

@MingcongBai reported that gold is commonly crashing stuffs. Oh no my GNU belief.

Artoria2e5 commented 9 years ago

@MingcongBai Maybe we should remove the fno-use-linker-plugins stuff, as forcing such thing is really weird..

MingcongBai commented 9 years ago

@Arthur2e5 It is sensible to remove this flag.

Artoria2e5 commented 8 years ago

Bai has already added some bumpy way of doing this, and it works fine (thanks to the good option compatibility…). Uh… Should we consider this still? It's just CFLAGS stuffs written again.

MingcongBai commented 8 years ago

It seems like at the moment, a symlink would be (sadly) one of the suck-less choices we would have.