Skip to content
This repository was archived by the owner on Apr 10, 2024. It is now read-only.

Commit

Permalink
makefile: Enforce lld usage
Browse files Browse the repository at this point in the history
clang-12: error: unable to execute command: Executable "ld" doesn't exist!
clang-12: error: linker command failed with exit code 1 (use -v to see invocatio
n)

Signed-off-by: penglezos <[email protected]>
  • Loading branch information
penglezos committed Feb 12, 2023
1 parent 84dda5c commit e4a23e5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ HOSTCXX = g++
HOSTCFLAGS := -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 \
-fomit-frame-pointer -std=gnu89 $(HOST_LFS_CFLAGS)
HOSTCXXFLAGS := -O2 $(HOST_LFS_CFLAGS)
HOSTLDFLAGS := $(HOST_LFS_LDFLAGS)
HOSTLDFLAGS += $(HOST_LFS_LDFLAGS)
HOST_LOADLIBES := $(HOST_LFS_LIBS)

ifeq ($(shell $(HOSTCC) -v 2>&1 | grep -c "clang version"), 1)
Expand All @@ -392,6 +392,8 @@ DEPMOD = /sbin/depmod
PERL = perl
PYTHON = python
CHECK = sparse
HOSTLDFLAGS += -fuse-ld=lld
HOSTCFLAGS += -fuse-ld=lld

CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
-Wbitwise -Wno-return-void $(CF)
Expand Down

0 comments on commit e4a23e5

Please sign in to comment.