Policy for removing target support

Rainer Orth ro@CeBiTec.Uni-Bielefeld.DE
Thu Sep 11 07:49:00 GMT 2025


Hi Jan,

> 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.

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.  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 you can see, many have been removed from GCC for more than a decade
>> and I don't see much use in developers being able to use current
>> versions of binutils with an ancient version of gcc, if the combination
>> builds and works at all.
>> 
>> My suggestion would be to remove support for any version before Solaris 10.  
>> While the code to be removed would not be large (mostly sections in
>> config.bfd and configure.tgt), we'd be left with only configurations
>> where the OS is 64-bit capable, so no need to handle 32-bit-only
>> configs.
>> 
>> However, I wonder what the binutils policy for such removals is.  When I
>> suggested removing IRIX 5 and 6 and Tru64 UNIX support a couple of years
>> ago, that met with considerable resistance (especially for IRIX)
>> although support had been removed from GCC in 4.6 (IRIX < 6.5, Tru64
>> UNIX V4/V5.0) resp. 4.8 (IRIX 6.5 and Tru64 UNIX V5.1B).
>
> Generally I think we want to be more conservative with removal than gcc is.
> People may want to be able to use a somewhat older gcc with up-to-date
> binutils. Especially when newer gcc has their favorite target removed.
> This doesn't, however, mean we should carry everything indefinitely.

Exactly.  Due to the "somewhat older" case, I'm still include Solaris 10
although I haven't tested this myself in ages (i.e. not since that
support was removed in GCC in 2020).

I think that falsly advertising support for OS versions is worse than
being honest, just removing it and notify users about it in
bfd/config.bfd.

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.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


More information about the Binutils mailing list