diff options
author | Uwe Kleine-König <uwe@kleine-koenig.org> | 2019-01-31 10:07:24 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2019-02-01 00:57:38 +0100 |
commit | 36a74d33c6645b7bff5661f57dcaf48f1b6d1c60 (patch) | |
tree | 69745f236790c6d4e1e5e39bbd1a8fa0be58b839 | |
parent | dd98d9f9bbca464ce9a113e52040f31fa539fc31 (diff) | |
download | sparse-36a74d33c6645b7bff5661f57dcaf48f1b6d1c60.tar.gz |
Makefile: default to LD = CC
Usually the compiler is used as linker. Assuming that if someone wants
to change the compiler the linker should be changed, too, simplify that
use case by using "$(CC)" as linker instead of the hard coded "gcc".
This also matches the behaviour of make when using the built-in rules
of GNU Make which include:
LINK.o = $(CC) $(LDFLAGS) $(TARGET_ARCH)
%: %.o
$(LINK.o) $^ $(LOADLIBES) $(LDLIBS) -o $@
Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | Makefile | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -8,7 +8,7 @@ OS = linux CC = gcc CFLAGS = -O2 -g CFLAGS += -Wall -Wwrite-strings -LD = gcc +LD = $(CC) AR = ar PKG_CONFIG = pkg-config CHECKER = CHECK=./sparse ./cgcc -no-compile |