| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: clang.mk,v 1.36 2022/07/05 17:32:24 jperkin Exp $ | | 1 | # $NetBSD: clang.mk,v 1.37 2022/07/07 17:19:55 jperkin Exp $ |
2 | # | | 2 | # |
3 | # This is the compiler definition for the clang compiler. | | 3 | # This is the compiler definition for the clang compiler. |
4 | # | | 4 | # |
5 | # User-settable variables: | | 5 | # User-settable variables: |
6 | # | | 6 | # |
7 | # CLANGBASE | | 7 | # CLANGBASE |
8 | # The base directory where the compiler is installed. | | 8 | # The base directory where the compiler is installed. |
9 | # | | 9 | # |
10 | | | 10 | |
11 | .if !defined(COMPILER_CLANG_MK) | | 11 | .if !defined(COMPILER_CLANG_MK) |
12 | COMPILER_CLANG_MK= defined | | 12 | COMPILER_CLANG_MK= defined |
13 | | | 13 | |
14 | # Add the dependency on clang | | 14 | # Add the dependency on clang |
| @@ -111,22 +111,18 @@ CWRAPPERS_PREPEND.cc+= -Qunused-argument | | | @@ -111,22 +111,18 @@ CWRAPPERS_PREPEND.cc+= -Qunused-argument |
111 | _WRAP_EXTRA_ARGS.CXX+= -Qunused-arguments | | 111 | _WRAP_EXTRA_ARGS.CXX+= -Qunused-arguments |
112 | CWRAPPERS_APPEND.cxx+= -Qunused-arguments | | 112 | CWRAPPERS_APPEND.cxx+= -Qunused-arguments |
113 | | | 113 | |
114 | # Xcode 12 has a zealous new default. Turn it off until we're ready, | | 114 | # Xcode 12 has a zealous new default. Turn it off until we're ready, |
115 | # while allowing callers (or users, via CFLAGS/CPPFLAGS) to override. | | 115 | # while allowing callers (or users, via CFLAGS/CPPFLAGS) to override. |
116 | .if ${OPSYS} == "Darwin" | | 116 | .if ${OPSYS} == "Darwin" |
117 | _NOERROR_IMPLICIT_cmd= ${CCPATH} -\#\#\# -E -x c /dev/null 2>&1 \ | | 117 | _NOERROR_IMPLICIT_cmd= ${CCPATH} -\#\#\# -E -x c /dev/null 2>&1 \ |
118 | | ${GREP} -q Werror=implicit-function-declaration \ | | 118 | | ${GREP} -q Werror=implicit-function-declaration \ |
119 | && ${ECHO} -Wno-error=implicit-function-declaration \ | | 119 | && ${ECHO} -Wno-error=implicit-function-declaration \ |
120 | || ${TRUE} | | 120 | || ${TRUE} |
121 | CWRAPPERS_PREPEND.cc+= ${_NOERROR_IMPLICIT_cmd:sh} | | 121 | CWRAPPERS_PREPEND.cc+= ${_NOERROR_IMPLICIT_cmd:sh} |
122 | .endif | | 122 | .endif |
123 | | | 123 | |
124 | .for _version_ in ${_C_STD_VERSIONS} | | | |
125 | _C_STD_FLAG.${_version_}?= -std=${_version_} | | | |
126 | .endfor | | | |
127 | | | | |
128 | .for _version_ in ${_CXX_STD_VERSIONS} | | 124 | .for _version_ in ${_CXX_STD_VERSIONS} |
129 | _CXX_STD_FLAG.${_version_}?= -std=${_version_} | | 125 | _CXX_STD_FLAG.${_version_}?= -std=${_version_} |
130 | .endfor | | 126 | .endfor |
131 | | | 127 | |
132 | .endif # COMPILER_CLANG_MK | | 128 | .endif # COMPILER_CLANG_MK |