Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-15435

clang: error: unknown argument: '-fwhole-program'

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.2.12
    • 10.2(EOL)
    • Compiling
    • None
    • OS X Mavericks 10.9.5, Xcode 6.2

    Description

      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:

      https://github.com/llvm-mirror/clang/commit/226bee35958fc978afb818b247601bcfa01d31fa

      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:

      https://github.com/MariaDB/server/commit/f853a99a4fad0f390d6b1f6c46648302ca6cf310

      For more information, and build logs, see https://trac.macports.org/ticket/55915

      Attachments

        Issue Links

          Activity

            People

              cvicentiu Vicențiu Ciorbaru
              ryandesign Ryan Carsten Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.