summary refs log tree commit diff stats
path: root/tools/niminst
diff options
context:
space:
mode:
authorStephen <stephengroat@users.noreply.github.com>2017-11-22 06:13:07 -0800
committerAndreas Rumpf <rumpf_a@web.de>2017-11-22 15:13:07 +0100
commit2c584cdb3d71f0cd811e3774c49db34735040032 (patch)
tree60bb7bf48e50bb71423a8671e5ad9b976fd386a0 /tools/niminst
parent85b00aff56c98f4da8f70b120dc889c18791fab9 (diff)
downloadNim-2c584cdb3d71f0cd811e3774c49db34735040032.tar.gz
use make default linker naming convention (#6787)
Diffstat (limited to 'tools/niminst')
-rw-r--r--tools/niminst/makefile.tmpl10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/niminst/makefile.tmpl b/tools/niminst/makefile.tmpl
index fa96117b8..42a590325 100644
--- a/tools/niminst/makefile.tmpl
+++ b/tools/niminst/makefile.tmpl
@@ -4,8 +4,8 @@
 #           "# Template is in tools/niminst/makefile.tmpl\n" &
 #           "# To regenerate run ``niminst csource`` or ``koch csource``\n"
 
-CC = gcc
-LINKER = gcc
+CC ??= gcc
+LD ??= gcc
 COMP_FLAGS = $(CPPFLAGS) $(CFLAGS) ?{c.ccompiler.flags}
 LINK_FLAGS = $(LDFLAGS) ?{c.linker.flags}
 binDir = ?{firstBinPath(c).toUnix}
@@ -29,7 +29,7 @@ endif
 ifeq ($(uos),freebsd)
   myos= freebsd
   CC = clang
-  LINKER = clang
+  LD = clang
   LINK_FLAGS += -lm
 endif
 ifeq ($(uos),openbsd)
@@ -43,7 +43,7 @@ endif
 ifeq ($(uos),darwin)
   myos = macosx
   CC = clang
-  LINKER = clang
+  LD = clang
   LINK_FLAGS += -ldl -lm
   ifeq ($(HOSTTYPE),x86_64)
     ucpu = amd64
@@ -171,7 +171,7 @@ endif
 
 ?{"$(binDir)/" & toLowerAscii(c.name)}: $(oFiles)
 	@mkdir -p $(binDir)
-	$(LINKER) -o $@ $^ $(LINK_FLAGS)
+	$(LD) -o $@ $^ $(LINK_FLAGS)
 	@echo "SUCCESS"
 
 .PHONY: clean