[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUstep: Specifying a minimum supported compiler version and using C
From: |
H. Nikolaus Schaller |
Subject: |
Re: GNUstep: Specifying a minimum supported compiler version and using C++17 internally |
Date: |
Sun, 1 Sep 2024 22:42:20 +0200 |
Hi Hugo,
> Am 01.09.2024 um 16:13 schrieb Hugo Melder <hugo@algoriddim.com>:
>
> Hey Riccardo,
>
>> Right now GNUstep is currently very portable because it supports "archaic"
>> GCC. Not just GCC, I mean GCC 4.x and I stand for that.
>
> But why GCC 4.x? It was first released in March 10, 2006…
well, an old first release date doesn't necessarily mean it is or has become
inherently bad... More important may be the last release date (i.e. end of
maintenance).
An old compiler may of course lack the bells and whistles that have been
invented since then (like you argue for using new C++ features), but C was
released in 1970ies and Objective C in the 1980ies and they all were already
Turing complete. Not requiring the latest and greatest tools can even be a
benefit. You know what you have and there is no risk a maintainer is changing
something unexpectedly.
BTW: gcc 4.9 is used e.g. in Debian Jessie which is small enough and robust and
mature to run on some older machines.
See for example:
root@letux:~# cat /etc/debian_version
8.11
root@letux:~# gcc --version
gcc (Debian 4.9.2-10+deb8u1) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
root@letux:~# fgrep MemTotal: /proc/meminfo
MemTotal: 53380 kB
root@letux:~# uname -a
Linux letux 6.11.0-rc5-letux-lx16+ #18886 PREEMPT Mon Aug 26 23:13:25 CEST 2024
mips GNU/Linux
root@letux:~#
Linux did raise requirements gcc 5.1 in Fall 2021. But they need tons of
special compiler features to optimize execution speed by the last 0.1% and the
real reason reported was: "Raising the minimum supported versions allows us to
remove all of the fallback helpers for !COMPILER_HAS_GENERIC_BUILTIN_OVERFLOW,
instead dispatching the compiler builtins," he explained.
Before you ask: the 6.11-rc5 kernel for this Jessie machine was cross-compiled
with gcc 6.3. So it already needed a workaround because gcc 4.9 isn't supported
any more.
So in summary this is more a discussion about portability to older machines,
ease of maintenance, latest features of compiler infrastructure, user's
expectations (which may be narrow or broad) and more factors which all need to
be balanced out without hurting anyone too much.
Regarding that Apple deprecates API, Riccardo already mentioned that this does
NOT mean they remove it. This is a great feature that you can often 20 years
old source code and still compile it in many cases (only sometimes you have to
fix something).
Just some thoughts and my 2cts...
Nikolaus