On Sat, Apr 4, 2020 at 5:41 PM Jun Aruga <jaruga(a)redhat.com> wrote:
I am trying to run the unit tests for an application (that is only
header files) in the%check section of the RPM spec file, running cmake
on both gcc and clang with %optflags macro on Fedora rawhide.
According to the guideline
https://docs.fedoraproject.org/en-US/packaging-guidelines/#_compiler_flags
, it seems %optflags macro works with both gcc and clang without the
restriction for a specific compiler.
The compiler flags Fedora sets are not compatible with Clang without
you doing filtering. Unfortunately, Clang hasn't been very good at
implementing some of the security features that we rely on in Fedora
from the system compiler, and it also does not support the specs we
pass to force certain build and link behaviors. Finally, of course it
doesn't support annobin.
The specific flags enabled are documented here:
https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/buildf...
--
真実はいつも一つ!/ Always, there's only one truth!