Configure script breakage with the new -Werror=implicit-function-declaration

FreeBSD and Gentoo Linux may use a clang configuration file. Clang Driver: Simplify Gentoo gcc-config detection · Issue #57570 · llvm/llvm-project · GitHub

  • Install a configuration file specifying -Wno-error=implicit-function-declaration. Configuration file specified options don’t trigger -Wunused-command-line-argument warnings.
  • Configure sys-devel/clang with an appropriate CLANG_CONFIG_FILE_SYSTEM_DIR. Change clang to a shell script which invokes ${default_triple}-clang. This is because xxx-clang loads xxx.cfg while clang doesn’t.

At work I dealt with error-by-default -Wimplicit-function-declaration. I ended up adding a lot of -Wno-error=implicit-function-declaration to our build systems (Bazel) for a dozen third-party projects.

1 Like