Opened 10 months ago

Last modified 10 months ago

#55915 new defect

mariadb-10.2 @10.2.12: clang: error: unknown argument: '-fwhole-program'

Reported by: ryandesign (Ryan Schmidt) Owned by: pixilla (Bradley Giesbrecht)
Priority: Normal Milestone:
Component: ports Version:
Keywords: mavericks Cc:
Port: mariadb-10.2


mariadb-10.2 fails to build on Mavericks because its version of clang (Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)) is too old to understand the -fwhole-program flag that mariadb's build system uses.

I'm not sure when this flag was introduced into clang but the build succeeds on Yosemite with its clang (Apple LLVM version 7.0.2 (clang-700.1.81)).

Change History (1)

comment:1 Changed 10 months ago by ryandesign (Ryan Schmidt)

I did some more research and filed an upstream bug report:

It appears that -fwhole-program is completely pointless for us. New versions of clang ignore it (they print a warning that the option is not supported), while old versions error out. We could probably just remove the flag.

I'm not clear why we don't see the same error with mariadb-10.1, which contains the flag too. Maybe the particular subsection of the build that involves this flag is off by default on 10.1 but on by default on 10.2.

Note: See TracTickets for help on using tickets.