Policy for removing target support
Jan Beulich
jbeulich@suse.com
Thu Sep 11 08:08:42 GMT 2025
On 11.09.2025 09:49, Rainer Orth wrote:
>> On 10.09.2025 17:34, Rainer Orth wrote:
>>> I'm currently working on PR ld/33374 where ld on Solaris claims support
>>> for emulations that are actually rejected. While looking into this, I
>>> noticed quite a few inconsistencies in both bfd/config.bfd and
>>> ld/configure.tgt in that area, together with cleanup opportunities with
>>> the Solaris linker emulations.
>>>
>>> While working on this, I noticed that many long obsolete versions of
>>> Solaris are still listed in both files. However, I wonder if there's
>>> any use in keeping them since I'm almost certain nobody still uses, let
>>> alone tests them. While I do have Solaris systems back to Solaris 8 if
>>> really need be, I use them only very rarely for digging into history.
>>> In fact, I've removed Solaris support in GCC for all versions before
>>> Solaris 11.4:
>>>
>>> OS version removed from GCC
>>> release year
>>>
>>> Solaris 7 4.6 2011 64-bit SPARC support
>>> 8 4.8 2013
>>> 9 5 2015
>>> 10 10 2020 64-bit x86 support
>>> < 11.4 15 2025
>>
>> First - how do these version map to what we use in binutils. For example,
>> in bfd/config.bfd all mentions of "solaris" are "solaris2" or longer.
>> ld/configure.tgt has a few without the "2". (I'm simply trying to
>> understand which particular entries there you consider purging.)
>
> let me address this from a different angle first:
>
> I've just now tried to build current trunk on Solaris 8 (both sparc and
> x86): compilation immediately fails
>
> bfd/doc/chew.c: In function 'collapse_whitespace':
> bfd/doc/chew.c:943:7: error: array subscript has type 'char' [-Werror=char-subscripts]
> bfd/doc/chew.c: In function 'print':
> bfd/doc/chew.c:1473:60: error: expected ')' before 'PRIdPTR'
> bfd/doc/chew.c:1473:60: error: spurious trailing '%' in format [-Werror=format]
>
> While <sys/int_fmtio.h> has several other PRId* macros, that one is
> missing. That file has used this since 2.41, but apparently no one
> noticed.
So there are really two aspects here: One is whether we can still build
_on_ those old versions, and another is whether we should still support
building _for_ those old versions. The "can build on" aspect can, in
principle, be solved by using a newer compiler on those systems. Hence
at the very least I think both aspects want dealing with separately.
> Apart from that, bfd/config.bfd and ld/configure.tgt have several
> inconsistencies right now, like a 64-bit target defaulting to 32-bit
> code or variations between sparc and x86.
>
> My goal is to achieve the following (without removing support for older
> Solaris versions):
>
> * On 32-bit only systems (SPARC before Solaris 2.7, x86 before Solaris
> 10) only include 32-bit support.
>
> * On 64-bit capable systems, when configured with a 32-bit target
> default to 32-bit code while supporting 64-bit.
>
> * On 64-bit capable systems, when configured with a 64-bit target
> default to 64-bit code while supporting 32-bit.
>
> With Solaris < 10 support removed, the 32-bit-only variant can go and
> the cases be simplified.
Makes sense if we settle on going with that boundary.
> Let me give my current config.bfd as an
> example, giving just the case labels:
>
> i[3-7]86-*-solaris2.1[01]*)
> i[3-7]86-*-solaris2.[0-9]*)
> #ifdef BFD64
> x86_64-*-solaris2.1[01]*)
> #endif
> #ifdef BFD64
> sparc-*-solaris2.[7-9]* | sparc-*-solaris2.1[01]*)
> sparcv9-*-solaris2.[7-9]* | sparcv9-*-solaris2.1[01]* | \
> sparc64-*-solaris2.[7-9]* | sparc64-*-solaris2.1[01]*)
> #endif
> sparc-*-solaris2.[0-6]*)
>
> With Solaris < 10, this can be simplified considerably. And since the
> code doesn't build anyway, there's little point in keeping older
> versions. Sure, this could be fixed but what's the point if nobody
> noticed so far?
As said - building _for_ and building _on_ are separate things.
> Btw., I've also noticed another candidate for removal: in a few places
> powerpc*-*-solaris2* is still mentioned. However, only Solaris 2.5.1
> back in 1996 supported the platform and support was already removed in
> Solaris 2.6 in 1997. I never had hardware to even try it, its hardware
> requirements making it difficult for anyone to use. At least the target
> triple is mentioned in a few places only: bfd/config.bfd, configure.ac,
> and ld/configure.ac. There may be other PowerPC-specific code to be
> removed, though.
Yes, I too was wondering about these when going through yesterday. I
think we want to immediately deprecate them, and then drop them a
release or two later. And yes, e.g. gas/config/tc-ppc.c has quite a
few mentions of Solaris, which could then all go away.
Jan
More information about the Binutils
mailing list