Module Name: src Committed By: lukem Date: Tue May 30 18:39:19 UTC 2023
Modified Files: src/tools/compat: configure.ac defs.mk.in Log Message: tools/compat: detect supported host compiler flags Define NB_CC_FLAG(FLAG) to use AX_CHECK_COMPILE_FLAG to determine if the host compiler supports FLAG and define and AC_SUBST CC_FLAG if so. Use workarounds to force clang to hard-fail on unknown -Wwarning, and gcc to use -WWARN to check unknown -Wno-WARN because the latter doesn't cause an error in gcc. In the future we could use NB_CC_FLAG([-fcommon]) for older NetBSD release branches compiled with host gcc 10+. Rework Darwin -no-cpp-precomp check to use NB_CC_FLAG(). Note: this flag probably hasn't been required on macOS (Darwin) for a long time, but serves as a good example on how to use this. Display varaibles at the end of configure to show what was detected. To generate a diff of this commit: cvs rdiff -u -r1.102 -r1.103 src/tools/compat/configure.ac cvs rdiff -u -r1.13 -r1.14 src/tools/compat/defs.mk.in Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.