From 7a421ba57f3f8ef0b716c586adf952402393f636 Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Sat, 6 Jun 2020 03:40:18 +0200 Subject: [PATCH] INIT: tweak cc.{darwin,freebsd}; add cc.openbsd (cherry picked from commit a1d8ff6faca522a29161582952e232afc76fd643) --- src/cmd/INIT/cc.darwin | 2 +- src/cmd/INIT/cc.freebsd | 12 ++++++++++++ src/cmd/INIT/cc.freebsd12.amd64 | 9 --------- src/cmd/INIT/cc.openbsd | 12 ++++++++++++ 4 files changed, 25 insertions(+), 10 deletions(-) create mode 100755 src/cmd/INIT/cc.freebsd delete mode 100755 src/cmd/INIT/cc.freebsd12.amd64 create mode 100755 src/cmd/INIT/cc.openbsd diff --git a/src/cmd/INIT/cc.darwin b/src/cmd/INIT/cc.darwin index 21f84c997..2af08a00d 100755 --- a/src/cmd/INIT/cc.darwin +++ b/src/cmd/INIT/cc.darwin @@ -46,7 +46,7 @@ init) echo "cc: arguments expected" >&2 cpp) $CC -E "$@" ;; cc) $CC -DSHOPT_SPAWN=0 -D_ast_int8_t=int64_t -D_lib_memccpy \ - -Wno-unused-value -Wno-parentheses -Wno-macro-redefined "$@" + -Wno-unused-value -Wno-parentheses "$@" ;; dll) $CC -Wl,-flat_namespace -dynamiclib -undefined dynamic_lookup "$@" ;; diff --git a/src/cmd/INIT/cc.freebsd b/src/cmd/INIT/cc.freebsd new file mode 100755 index 000000000..92ce4d556 --- /dev/null +++ b/src/cmd/INIT/cc.freebsd @@ -0,0 +1,12 @@ +: FreeBSD cc wrapper + +HOSTTYPE=freebsd.generic + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +exec /usr/bin/cc -P \ + -Wno-unused-value \ + -Wno-parentheses \ + "$@" diff --git a/src/cmd/INIT/cc.freebsd12.amd64 b/src/cmd/INIT/cc.freebsd12.amd64 deleted file mode 100755 index d394a1901..000000000 --- a/src/cmd/INIT/cc.freebsd12.amd64 +++ /dev/null @@ -1,9 +0,0 @@ -: linux.i386-64 cc wrapper : 2006-02-14 : - -HOSTTYPE=freebsd12.amd64 - -case " $* " in -*" -dumpmachine "*) echo $HOSTTYPE; exit ;; -esac - -/usr/bin/cc -P "$@" diff --git a/src/cmd/INIT/cc.openbsd b/src/cmd/INIT/cc.openbsd new file mode 100755 index 000000000..cc5b9cdd4 --- /dev/null +++ b/src/cmd/INIT/cc.openbsd @@ -0,0 +1,12 @@ +: OpenBSD cc wrapper + +HOSTTYPE=openbsd.generic + +case " $* " in +*" -dumpmachine "*) echo $HOSTTYPE; exit ;; +esac + +exec /usr/bin/cc -P \ + -Wno-unused-value \ + -Wno-parentheses \ + "$@"