tech-pkg archive

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

Re: A better method to require compiler features



Greg Troxel wrote:
> 
> [...]
> Yes, but this has nothing to do with the proposal on the table, which is
> 
>   move from
> 
>     USE_LANGUAGES defining which C++ language family member is needed,
>     even though that is unimplemented
>     
>     ad hoc use of GCC_REQD as  a workaround for not having a good way to
>     express which language is needed.    
> 
>   to
> 
>     USE_LANGUAGES just says C++
> 
>     USE_CXX_FEATURES defines which specific language and which specific
>     features that are not necessarily bound to a language.
> 
> 
> Both of those situations have *exactly the same* multiple-gcc-in-use
> problems, so that objection is orthogonal.  A proposal to mitigate it
> is fine -- just not relevant to the USE_CXX_FEATURES discussion.

I think in general this change would be a good idea. But for a package
maintainer it may be harder to declare what is required with the
proposed new system.

It is unlikely that upstreams document the features used. Manually
searching for all of them in the source code looks not very convenient,
particularly if the list gets long in the future.

There should be some tool that checks for the features used in a
source tree. Maybe as simple as searching for the header corresponding
to a feature (e.g. "#include <filesystem>") and print the feature name
that has to be added to USE_CXX_FEATURES.


Home | Main Index | Thread Index | Old Index