kiss-community / repo

KISS Linux - Unofficial Repositories, mirror of https://codeberg.org/kiss-community/repo
https://kisslinux.org
MIT License
39 stars 17 forks source link

gcc: don't bootstrap if the version is bigger than min required #68

Closed kyx0r closed 2 years ago

kyx0r commented 2 years ago

Instead of just comparing strings, if I understand correctly it's better to just check for the min version. So check something like is gcc older than 4.8, only then do bootstrap. (that scenario is unlikely on kiss but you never know)

I can't believe how much electricity and time has been wasted doing this bootstrap nonsense

This will massively speed up compile times as currently it's doing redundant work as shown here: https://github.com/ehawkvu/kiss-xorg/issues/43

kyx0r commented 2 years ago

I guess the only reason you might want to do this bootstrap is if there is a compiler bug that propagates from the old version to the new, but in practice this can happen even when going from minor version to minor, so then it's just pointless. That whole check might as well be commented out.

kyx0r commented 2 years ago

The best solution might be to add a prompt to ask if the user wants the bootstrap, set using KISS_PROMPT. Thing is if the user avoids bootstrap, updates gcc, then uses that gcc to compile same gcc, statistically it's very unlikely for a bug to double propagate, but even then you are looking at compiling for 8 minutes VS 18 minutes.

ioraff commented 2 years ago

I've fixed the version check with 631bb4b, so that bootstrapping is only enabled for major version changes.

Given the infrequency of major version changes and the importance of such a sanity check for a source-based distribution, I'd like to keep this check non-optional -- you can of course still fork the package if you insist.