summary refs log tree commit diff stats
path: root/tools/niminst
diff options
context:
space:
mode:
authoralaviss <alaviss@users.noreply.github.com>2019-06-03 13:45:52 +0700
committerAndreas Rumpf <rumpf_a@web.de>2019-06-03 08:45:52 +0200
commit1d1c72dfbbbfb2816b6af347c1cbdbdf5bfe55cb (patch)
tree0e9787be007d4eafb696b48335bf3ed1157c91d6 /tools/niminst
parent5c5df61071412773fbf21adcf498a4942d23d92b (diff)
downloadNim-1d1c72dfbbbfb2816b6af347c1cbdbdf5bfe55cb.tar.gz
niminst: get rid of LINKER / LD (#11379)
* niminst: get rid of LINKER / LD

They don't seem to be used anywhere, and clashes with *nix `$LD`
Diffstat (limited to 'tools/niminst')
-rw-r--r--tools/niminst/buildsh.nimf7
-rw-r--r--tools/niminst/makefile.nimf5
2 files changed, 3 insertions, 9 deletions
diff --git a/tools/niminst/buildsh.nimf b/tools/niminst/buildsh.nimf
index bfffaf9bf..1e96511c5 100644
--- a/tools/niminst/buildsh.nimf
+++ b/tools/niminst/buildsh.nimf
@@ -40,7 +40,6 @@ do
 done
 
 CC="${CC:-gcc}"
-LINKER="${LD:-gcc}"
 COMP_FLAGS="${CPPFLAGS:-} ${CFLAGS:-} ?{c.ccompiler.flags}$extraBuildArgs"
 LINK_FLAGS="${LDFLAGS:-} ?{c.linker.flags}"
 PS4=""
@@ -60,7 +59,7 @@ if [ ! -d $binDir ]; then
 fi
 
 #  add(result, "# override OS, CPU and OS Name with command-line arguments\n")
-if [ -n "$optos" ]; then 
+if [ -n "$optos" ]; then
   uos="$optos"
 fi
 if [ -n "$optcpu" ]; then
@@ -87,7 +86,6 @@ case $uos in
   *freebsd* )
     myos="freebsd"
     CC="clang"
-    LINKER="clang"
     LINK_FLAGS="$LINK_FLAGS -lm"
     ;;
   *openbsd* )
@@ -101,7 +99,6 @@ case $uos in
   *darwin* )
     myos="macosx"
     CC="clang"
-    LINKER="clang"
     LINK_FLAGS="$LINK_FLAGS -ldl -lm"
     if [ "$HOSTTYPE" = "x86_64" ] ; then
       ucpu="amd64"
@@ -209,7 +206,7 @@ case $myos in
     $CC $COMP_FLAGS -Ic_code -c ?{f} -o ?{changeFileExt(f, "o")}
 #        add(linkCmd, " \\\n" & changeFileExt(f, "o"))
 #      end for
-    $LINKER -o ?{"$binDir/" & toLowerAscii(c.name)} ?linkCmd $LINK_FLAGS
+    $CC -o ?{"$binDir/" & toLowerAscii(c.name)} ?linkCmd $LINK_FLAGS
     ;;
 #    end for
   *)
diff --git a/tools/niminst/makefile.nimf b/tools/niminst/makefile.nimf
index 8aabac09b..0f2c1920e 100644
--- a/tools/niminst/makefile.nimf
+++ b/tools/niminst/makefile.nimf
@@ -5,7 +5,6 @@
 #           "# To regenerate run ``niminst csource`` or ``koch csource``\n"
 
 CC ??= gcc
-LD ??= gcc
 CFLAGS += -Ic_code ?{c.ccompiler.flags}
 LDFLAGS += ?{c.linker.flags}
 binDir = ?{firstBinPath(c).toUnix}
@@ -35,7 +34,6 @@ endif
 ifeq ($(uos),freebsd)
   myos= freebsd
   CC = clang
-  LD = clang
   LDFLAGS += -lm
 endif
 ifeq ($(uos),openbsd)
@@ -49,7 +47,6 @@ endif
 ifeq ($(uos),darwin)
   myos = macosx
   CC = clang
-  LD = clang
   LDFLAGS += -ldl -lm
   ifeq ($(HOSTTYPE),x86_64)
     ucpu = amd64
@@ -181,7 +178,7 @@ endif
 
 $(target): $(oFiles)
 	@mkdir -p $(binDir)
-	$(LD) -o $@ $^ $(LDFLAGS)
+	$(CC) -o $@ $^ $(LDFLAGS)
 	@echo "SUCCESS"
 
 .PHONY: clean