sbcl icon indicating copy to clipboard operation
sbcl copied to clipboard

do not hardcode LD=ld in GNUmakefile

Open tgbugs opened this issue 4 years ago • 1 comments

When cross compiling for an alternate libc implementation (e.g. musl for static linking) a different linker required. It is currenly impossible to pass LD=some-other-linker-ld in the environment or as part of a call to make because the GNUmakefile hardcodes LD=ld. This commit fixes that an also make it so that make-target-contrib.sh inhertis LD in the same way that it inherits CC.

I'm to 100% sure that this works as expected. I've tried it in what should be a clean environment without issue, but am not entirely sure that LD will be set correctly be default.

tgbugs avatar Jan 26 '21 01:01 tgbugs

I build sbcl twice or three times a year locally.

Currently using clang both as compiler and linker. May want to try out LLVM's lld in future.

It'd be great to pass LD=MY_LINKER to make.sh.

Thanks for providing and maintaining SBCL!

catull avatar Feb 28 '21 11:02 catull