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`
This commit is contained in:
alaviss
2019-06-03 13:45:52 +07:00
committed by Andreas Rumpf
parent 5c5df61071
commit 1d1c72dfbb
2 changed files with 3 additions and 9 deletions

View File

@@ -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
*)

View File

@@ -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