-
-
Notifications
You must be signed in to change notification settings - Fork 89
Add optional LDFLAGS to Makefile in order to support faster linking #1127
Copy link
Copy link
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Using the "mold", "gold" or "lld" linker instead of the regular bfd linker significantly shortens linking the final binaries and uses less memory.
On my Linux PC with mold piscsi takes about 0.2 s for linking, whereas with bfd it needs about 4.5 s.
On a Pi Zero with lld (mold would be faster but does not appear to be available for Raspbian) linking piscsi takes about 25 s, with gold about 50 s, with bfd about 2.5 min. All in all on a slow Pi several minutes of build time can be saved.
By adding optional LDFLAGS to the Makefile the linker to be used is selectable, e.g.
export LDFLAGS="-fuse-ld=gold"
This change is backwards compatible.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request