On 4/23/21 9:27 AM, Qiyu Yan wrote:
在 2021-04-23星期五的 11:18 -0400,Ben Cotton写道:
The policy update will also recommend that packagers use standardized
macro names when using conditional options to control the compiler
choice:

%bcond_with toolchain_clang
%bcond_with toolchain_gcc
replacing current
%global toolchain clang
or
%global toolchain gcc

described at
https://src.fedoraproject.org/rpms/redhat-rpm-config//blob/rawhide/f/macros#_41
?

No, you would still need to use the toolchain macro.  The bcond_with is for 
adding
an option that you can pass to rpmbuild or mock to control the compiler.  I will
try to add a full example to the packager guidelines so this is clear, but if
you wanted to add the option to build with clang, while still using gcc by 
default,
then your spec file would look like this:

%bcond_with toolchain_clang

%if %{with toolchain_clang}
%global toolchain clang
%endif

-Tom



_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

_______________________________________________
devel mailing list -- devel@lists.fedoraproject.org
To unsubscribe send an email to devel-le...@lists.fedoraproject.org
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/devel@lists.fedoraproject.org
Do not reply to spam on the list, report it: 
https://pagure.io/fedora-infrastructure

Reply via email to