Re: What is the best practice to use both gcc and clang flags macros in %check?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



As a reference, the following case works as expected on Fedora rawhide.

```
<mock-chroot> sh-5.0# rpm -q rpm
rpm-4.16.0-0.beta3.2.fc33.3.x86_64

<mock-chroot> sh-5.0# rpm -q redhat-rpm-config
redhat-rpm-config-166-1.fc33.noarch

<mock-chroot> sh-5.0# rpm --define 'toolchain gcc' --eval '%{optflags}'
-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches
-pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS
-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1
-fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1
 -m64 -mtune=generic -fasynchronous-unwind-tables
-fstack-clash-protection -fcf-protection

<mock-chroot> sh-5.0# rpm --define 'toolchain clang' --eval '%{optflags}'
-O2 -flto -fexceptions -g -grecord-gcc-switches -pipe -Wall
-Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-Wp,-D_GLIBCXX_ASSERTIONS --config
/usr/lib/rpm/redhat/redhat-hardened-clang.cfg -fstack-protector-strong
  -m64 -mtune=generic -fasynchronous-unwind-tables  -fcf-protection
```

-- 
Jun | He - His - Him
_______________________________________________
packaging mailing list -- packaging@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to packaging-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/packaging@xxxxxxxxxxxxxxxxxxxxxxx




[Index of Archives]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Forum]     [KDE Users]

  Powered by Linux