say hello to nwcc, slightly b0rken though

This commit is contained in:
tg 2008-10-30 17:11:14 +00:00
parent bf3194e937
commit e561d9adfe

@ -1,5 +1,5 @@
#!/bin/sh #!/bin/sh
srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.364 2008/10/28 14:32:36 tg Exp $' srcversion='$MirOS: src/bin/mksh/Build.sh,v 1.365 2008/10/30 17:11:14 tg Exp $'
#- #-
# Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS # Environment used: CC CFLAGS CPPFLAGS LDFLAGS LIBS NOWARN NROFF TARGET_OS
# CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI # CPPFLAGS recognised: MKSH_SMALL MKSH_ASSUME_UTF8 MKSH_NOPWNAM MKSH_NOVI
@ -411,6 +411,7 @@ $e $bi$me: Scanning for functions... please ignore any errors.$ao
# ICC defines __GNUC__ too # ICC defines __GNUC__ too
# GCC defines __hpux too # GCC defines __hpux too
# - LLVM+clang defines __GNUC__ too # - LLVM+clang defines __GNUC__ too
# - nwcc defines __GNUC__ too
CPP="$CC -E" CPP="$CC -E"
$e ... which compiler seems to be used $e ... which compiler seems to be used
echo '#if defined(__ICC) || defined(__INTEL_COMPILER) echo '#if defined(__ICC) || defined(__INTEL_COMPILER)
@ -449,6 +450,8 @@ ct=tendra
ct=tcc ct=tcc
#elif defined(__llvm__) && defined(__clang__) #elif defined(__llvm__) && defined(__clang__)
ct=clang ct=clang
#elif defined(__NWCC__)
ct=nwcc
#elif defined(__GNUC__) #elif defined(__GNUC__)
ct=gcc ct=gcc
#elif defined(_COMPILER_VERSION) #elif defined(_COMPILER_VERSION)
@ -537,6 +540,9 @@ msc)
;; ;;
esac esac
;; ;;
nwcc)
vv '|' "$CC -version"
;;
pcc) pcc)
vv '|' "$CC -v" vv '|' "$CC -v"
;; ;;
@ -760,6 +766,8 @@ elif test $ct = tcc; then
ac_flags 1 boundschk -b ac_flags 1 boundschk -b
elif test $ct = clang; then elif test $ct = clang; then
i=1 i=1
elif test $ct = nwcc; then
ac_flags 1 ssp -stackprotect
fi fi
# flags common to a subset of compilers (run with -Werror on gcc) # flags common to a subset of compilers (run with -Werror on gcc)
if test 1 = $i; then if test 1 = $i; then