tech-pkg archive

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

Re: lingering USE_LANGUAGES documentation



On Sat, 09 Dec 2023 at 11:10:08 -0500, Greg Troxel wrote:
in mk/compiler.mk:

#       If the package assumes the compiler defaults to a specific
#       language version, the USE_LANGUAGES variable can also be used
# to force the inclusion of flags such as -std=c++11. In this case,
#       USE_CC_FEATURES/USE_CXX_FEATURES should also be set.


My impression is that this is at best deprecated, and the proper
approach is FORCE_CXX_STD (which is documented just below the above).

And therefore, we should

 remove that paragraph

 from the list of valid values, drop the specific language families
 like c++11


If that's not right, then I would like to understand why, so we can
explain under what circumstances USE_LANGUAGES of e.g. c++11 is correct.

I'm pressed for time at the moment, but would mention that the FORCE_*
variables are defined for compilers that accept "GCC style" arguments;
for those that don't, this would (presently) have no effect.

An example evidently would be PCC, which has

# Turn on C99 support if required
#.if !empty(USE_LANGUAGES:Mc99)
#_WRAP_EXTRA_ARGS.CC+=	-xc99
#.endif

in mk/compiler/pcc.mk. That could of course be adjusted.

Regards,

Dave


Home | Main Index | Thread Index | Old Index