Wed Mar 27 11:33:00 2024 UTC (57d)
clang: note precise Apple clang version in comment.


(schmonz)
diff -r1.44 -r1.45 pkgsrc/mk/compiler/clang.mk

cvs diff -r1.44 -r1.45 pkgsrc/mk/compiler/clang.mk (expand / switch to unified diff)

--- pkgsrc/mk/compiler/clang.mk 2024/03/20 10:47:22 1.44
+++ pkgsrc/mk/compiler/clang.mk 2024/03/27 11:33:00 1.45
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: clang.mk,v 1.44 2024/03/20 10:47:22 schmonz Exp $ 1# $NetBSD: clang.mk,v 1.45 2024/03/27 11:33:00 schmonz 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)
12COMPILER_CLANG_MK= defined 12COMPILER_CLANG_MK= defined
13 13
14# Add the dependency on clang 14# Add the dependency on clang
@@ -71,29 +71,29 @@ _LANGUAGES.clang+= ${LANGUAGES.clang:M${ @@ -71,29 +71,29 @@ _LANGUAGES.clang+= ${LANGUAGES.clang:M${
71PKGSRC_FORTRAN?=gfortran 71PKGSRC_FORTRAN?=gfortran
72 72
73.if !empty(PKGSRC_FORTRAN) && (!empty(USE_LANGUAGES:Mfortran) || !empty(USE_LANGUAGES:Mfortran77)) 73.if !empty(PKGSRC_FORTRAN) && (!empty(USE_LANGUAGES:Mfortran) || !empty(USE_LANGUAGES:Mfortran77))
74. include "../../mk/compiler/${PKGSRC_FORTRAN}.mk" 74. include "../../mk/compiler/${PKGSRC_FORTRAN}.mk"
75.endif 75.endif
76 76
77_WRAP_EXTRA_ARGS.CC+= -Qunused-arguments 77_WRAP_EXTRA_ARGS.CC+= -Qunused-arguments
78CWRAPPERS_APPEND.cc+= -Qunused-arguments 78CWRAPPERS_APPEND.cc+= -Qunused-arguments
79CWRAPPERS_PREPEND.cc+= -Qunused-arguments 79CWRAPPERS_PREPEND.cc+= -Qunused-arguments
80_WRAP_EXTRA_ARGS.CXX+= -Qunused-arguments 80_WRAP_EXTRA_ARGS.CXX+= -Qunused-arguments
81CWRAPPERS_APPEND.cxx+= -Qunused-arguments 81CWRAPPERS_APPEND.cxx+= -Qunused-arguments
82 82
83.if defined(_PKGSRC_BARRIER) 83.if defined(_PKGSRC_BARRIER)
84# Xcode 12 and upstream Clang 16 have a zealous new default that the 84# Xcode 12 (Apple clang-1200.0.32.2) and upstream Clang 16 have a
85# wide world of random third-party software isn't ready for. Turn it 85# zealous new default that the wide world of random third-party software
86# back off by default. 86# isn't ready for. Turn it back off by default.
87# 87#
88# Packages and users can override via CFLAGS/CPPFLAGS. 88# Packages and users can override via CFLAGS/CPPFLAGS.
89_NOERROR_IMPLICIT_cmd= ${CCPATH} -\#\#\# -E -x c /dev/null \ 89_NOERROR_IMPLICIT_cmd= ${CCPATH} -\#\#\# -E -x c /dev/null \
90 2>&1 \ 90 2>&1 \
91 | ${GREP} -q Werror=implicit-function-declaration \ 91 | ${GREP} -q Werror=implicit-function-declaration \
92 && ${ECHO} -Wno-error=implicit-function-declaration \ 92 && ${ECHO} -Wno-error=implicit-function-declaration \
93 || ${TRUE} 93 || ${TRUE}
94CWRAPPERS_PREPEND.cc+= ${_NOERROR_IMPLICIT_cmd:sh} 94CWRAPPERS_PREPEND.cc+= ${_NOERROR_IMPLICIT_cmd:sh}
95 95
96# Xcode 15 (Apple clang-1500.3.9.4) and upstream Clang 16 have several 96# Xcode 15 (Apple clang-1500.3.9.4) and upstream Clang 16 have several
97# more zealous new defaults. We can't default them off as precisely 97# more zealous new defaults. We can't default them off as precisely
98# (they don't show up in `clang -###` output), so we simply attempt to 98# (they don't show up in `clang -###` output), so we simply attempt to
99# turn them off for any clang that doesn't complain when we try. 99# turn them off for any clang that doesn't complain when we try.