Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add %toolchain macro to differentiate C/C++ toolchains #1231

Closed
tbaederr opened this issue May 19, 2020 · 3 comments
Closed

Add %toolchain macro to differentiate C/C++ toolchains #1231

tbaederr opened this issue May 19, 2020 · 3 comments

Comments

@tbaederr
Copy link
Contributor

This is often needed when supporting builds with multiple compilers. Simply looking at %__cc is not enough since the actual executable might be called differently, but might still be gcc. Or clang.
Doing a substring search is also problematic since "g++" is a substring of "clang++".

So it would be nice if rpm provided a standard macro for this.

Does this make sense for RPM and does %toolchain sound fine? If so, I can work on the actual implementation.
It does seem like the value of %toolchain would have to be set for every compiler specially though.

@pmatilai
Copy link
Member

pmatilai commented May 19, 2020

Not going into implementation and naming here, but the issue is certainly valid and applies broadly to all sorts of things, including but not limited to compiler flags from %optflags.

@voxik
Copy link
Contributor

voxik commented May 20, 2020

I wonder if there is any possible relation to https://src.fedoraproject.org/rpms/redhat-rpm-config/pull-request/82

@tbaederr
Copy link
Contributor Author

We will solve this differently, in redhat-rpm-config. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants