mariadb 10.2.12 fails to build on OS X Mavericks 10.9.5 with the error:
clang: error: unknown argument: '-fwhole-program'
This is with clang version Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) as provided by Xcode 6.2, which is the last version of Xcode that is compatible with Mavericks.
Newer versions of clang, such as the one in macOS High Sierra 10.13.3 display this warning instead:
clang: warning: optimization flag '-fwhole-program' is not supported [-Wignored-optimization-argument]
Here is the commit where the "feature" of ignoring this flag was added to clang:
Looking at the mariadb build system, it deliberately adds -fwhole-program only on Apple systems. But this appears to be pointless since Apple systems default to clang which doesn't support that option. Here is the commit where the flag was added to mariadb, though the commit is huge and doesn't explain itself:
For more information, and build logs, see https://trac.macports.org/ticket/55915