Skip to content

HOSTCC always uses its default linker #479

@nathanchance

Description

@nathanchance

Currently, there is no way to specify the host linker on a kernel wide scale. HOSTLD exists in a couple of Makefiles but much like the initial premise of #342, when $(HOSTCC) is used to compile then link executables, the default ld gets invoked.

See the failure here when ld is not available in PATH: https://travis-ci.com/nathanchance/continuous-integration/jobs/194766150

We want to have completely hermetic builds where no GNU tools are invoked, meaning that we need to provide -fuse-ld= to $(HOSTCC) somehow (or have $(HOSTLD) be exclusively used for linking). We can currently do this with the variable HOSTLDFLAGS (commit) but it would be nice for HOSTLD to work like LD currently does.

Metadata

Metadata

Labels

[BUG] linuxA bug that should be fixed in the mainline kernel.[FIXED][LINUX] 5.13This bug was fixed in Linux 5.13[TOOL] lldThe issue is relevant to LLD linkerenhancementNew feature or requesthermetic buildshas implications for doing gcc/binutils-free builds

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions