tech-pkg archive

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

Re: First go at adding GCC_VERSIONS_ACCEPTED support



atomicules <base%atomicules.co.uk@localhost> writes:

> On 25-Sep-2015 11:14:41, Greg Troxel wrote:
>> This approach would have the side effect of causing most packages
>> with GCC_REQD=4.5, for example, to be ok with a 4.8 compiler.
>>This is actually what's documented already in
>>mk/compiler/gcc.mk, but it seems that it doesn't do it.
>
> Sorry, you've lost me here. I don't follow where this is documented or
> what you mean by GCC_REQD=4.5 being ok with 4.8. Is this a known
> thing, that anything that compiles under 4.5 can go up to 4.8, but
> anything above that is questionable?

That was just an example.  What I meant is that if something is marked
GCC_REQD=4.5, then typically it's probably because someone tried to
build it with an older gcc and failed, and tried 4.5 and found that it
worked, or read a README.  So it's likely that newer versions are ok
too, unless they add warnings that trip over the code.  So 4.8 was just
an example; each higher version is less likely to work because of new
warnings.  I probably picked 4.8 because it comes with netbsd-7 and very
few things need newer than 4.8 at the moment.  (4.5 comes with netbsd-6.)

The big point was that GCC_REQD=4.5 shouldn't mean "don't try with newer
versions" because it's more likely that it will work than not.   This is
just optimizing the human work of only marking unusual things.

In mk/gcc/compiler.mk, it says:

# GCC_REQD
#	The minimum version of the GNU Compiler Collection that is
#	required to build this package. Setting this variable doesn't
#	change the compiler that is used for building packages. See
#	ONLY_FOR_COMPILER for that purpose. This is a list of version
#	numbers, of which the maximum version is the definitive one.
#
#	This variable can also be set by the user when USE_PKGSRC_GCC
#	is in effect to ensure that a specific compiler is used for
#	packages which do not specify a higher version.

which talks about a list, but that the last is "definitive".   So I
think this needs fixing.

Also, it's broken for this to be set by packages (which declare what
will work) and the user (which is about what the user wants).  It is
reasonable to have a different variable to ask for a default gcc
version, rather than the system one.

Attachment: pgp3QsXxoVvVi.pgp
Description: PGP signature



Home | Main Index | Thread Index | Old Index