Remove Solaris/PowerPC support
Commit Message
Solaris/PowerPC was a shortlived Solaris port with limited hardware
support. It was released with Solaris 2.5.1 back in 1996, with support
removed again only a year later in Solaris 2.6. Since this is long
obsolete, this patch removes the remains of the support.
Tested by a cross to ppc-unknown-linux-gnu to ascertain the build didn't
get broken.
There are two issues to note:
* gas/stabs.c has a Solaris/PowerPC reference. I've left that as is.
* The gas/po files need to be regenerated. I've now idea how, so I left
them alone. At that occasion I noticed that there are both es.po and
gas.es.po in gas/po. I found that confusing.
Rainer
Comments
On 15.09.2025 11:56, Rainer Orth wrote:
> Solaris/PowerPC was a shortlived Solaris port with limited hardware
> support. It was released with Solaris 2.5.1 back in 1996, with support
> removed again only a year later in Solaris 2.6. Since this is long
> obsolete, this patch removes the remains of the support.
>
> Tested by a cross to ppc-unknown-linux-gnu to ascertain the build didn't
> get broken.
Okay as far as the non-PPC parts go. For the PPC parts I'd prefer if
target maintainers gave their okay.
> There are two issues to note:
>
> * gas/stabs.c has a Solaris/PowerPC reference. I've left that as is.
>
> * The gas/po files need to be regenerated. I've now idea how, so I left
> them alone.
They're updated independently afaik, so leaving alone is trttd.
> At that occasion I noticed that there are both es.po and
> gas.es.po in gas/po. I found that confusing.
That's odd indeed. Without looking closely, my inclination is that they
can simply be removed.
Jan
On Mon, Sep 15, 2025 at 11:56:34AM +0200, Rainer Orth wrote:
> Solaris/PowerPC was a shortlived Solaris port with limited hardware
> support. It was released with Solaris 2.5.1 back in 1996, with support
> removed again only a year later in Solaris 2.6. Since this is long
> obsolete, this patch removes the remains of the support.
I'll OK this patch.
> Tested by a cross to ppc-unknown-linux-gnu to ascertain the build didn't
> get broken.
>
> There are two issues to note:
>
> * gas/stabs.c has a Solaris/PowerPC reference. I've left that as is.
Please remove that too. The changelog entry said it was added for
compatibility with the Solaris assembler.
> * The gas/po files need to be regenerated. I've now idea how, so I left
> them alone. At that occasion I noticed that there are both es.po and
> gas.es.po in gas/po. I found that confusing.
It looks like gas.es.po was an error, and es.po is newer. I'll remove
gas.es.po.
On 9/15/25 8:13 PM, Alan Modra wrote:
> On Mon, Sep 15, 2025 at 11:56:34AM +0200, Rainer Orth wrote:
>> Solaris/PowerPC was a shortlived Solaris port with limited hardware
>> support. It was released with Solaris 2.5.1 back in 1996, with support
>> removed again only a year later in Solaris 2.6. Since this is long
>> obsolete, this patch removes the remains of the support.
>
> I'll OK this patch.
Removing dead and unused code is always appreciated.
Thanks Rainer and Alan!
Peter
Hi Alan,
>> Tested by a cross to ppc-unknown-linux-gnu to ascertain the build didn't
>> get broken.
>>
>> There are two issues to note:
>>
>> * gas/stabs.c has a Solaris/PowerPC reference. I've left that as is.
done now.
> Please remove that too. The changelog entry said it was added for
> compatibility with the Solaris assembler.
Speaking of which, I've added the ChangeLog entries to the actual files
with the commit since
https://sourceware.org/binutils/wiki/HowToContribute
still says:
Changed files should be named in the accompanying email, and if
ChangeLog files are being updated, then there too.
However, it seems that apart from Nick's entries for the releases I'm
the only one still doing so. Maybe the WiKi page should be updated?
Rainer
Hi Peter,
> On 9/15/25 8:13 PM, Alan Modra wrote:
>> On Mon, Sep 15, 2025 at 11:56:34AM +0200, Rainer Orth wrote:
>>> Solaris/PowerPC was a shortlived Solaris port with limited hardware
>>> support. It was released with Solaris 2.5.1 back in 1996, with support
>>> removed again only a year later in Solaris 2.6. Since this is long
>>> obsolete, this patch removes the remains of the support.
>>
>> I'll OK this patch.
>
> Removing dead and unused code is always appreciated.
my pleasure. I just stumbled across those relics repeatedly when
checking the various config*.* files for Solaris-specific snippets.
Rainer
# HG changeset patch
# Parent f9eaeb447eeafd30063796459c5882238c19e05d
Remove Solaris/PowerPC support
@@ -1146,8 +1146,7 @@ case "${targ}" in
targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec powerpc_elf64_fbsd_vec"
;;
powerpc-*-*bsd* | powerpc-*-elf* | powerpc-*-sysv4* | powerpc-*-eabi* | \
- powerpc-*-solaris2* | powerpc-*-linux-* | powerpc-*-rtems* | \
- powerpc-*-chorus*)
+ powerpc-*-linux-* | powerpc-*-rtems* | powerpc-*-chorus*)
targ_defvec=powerpc_elf32_vec
targ_selvecs="rs6000_xcoff_vec powerpc_elf32_le_vec powerpc_boot_vec"
targ64_selvecs="powerpc_elf64_vec powerpc_elf64_le_vec"
@@ -5,6 +5,8 @@
* NaCl target support is removed.
+* Solaris/PowerPC target support is removed.
+
* Add support for RISC-V standard extensions:
sdtrig v1.0, ssstrict v1.0.
@@ -269,9 +269,6 @@
/* Target OS. */
#undef TARGET_OS
-/* Define if default target is PowerPC Solaris. */
-#undef TARGET_SOLARIS_COMMENT
-
/* Target vendor. */
#undef TARGET_VENDOR
@@ -134,22 +134,9 @@ static void ppc_elf_gnu_attribute (int);
/* Generic assembler global variables which must be defined by all
targets. */
-#ifdef OBJ_ELF
/* This string holds the chars that always start a comment. If the
- pre-processor is disabled, these aren't very useful. The macro
- tc_comment_chars points to this. We use this, rather than the
- usual comment_chars, so that we can switch for Solaris conventions. */
-static const char ppc_solaris_comment_chars[] = "#!";
-static const char ppc_eabi_comment_chars[] = "#";
-
-#ifdef TARGET_SOLARIS_COMMENT
-const char *ppc_comment_chars = ppc_solaris_comment_chars;
-#else
-const char *ppc_comment_chars = ppc_eabi_comment_chars;
-#endif
-#else
-const char comment_chars[] = "#";
-#endif
+ pre-processor is disabled, these aren't very useful. */
+const char ppc_comment_chars[] = "#";
/* Characters which start a comment at the beginning of a line. */
const char line_comment_chars[] = "#";
@@ -993,15 +980,6 @@ static enum { SHLIB_NONE, SHLIB_PIC, SHL
/* Flags to set in the elf header. */
static flagword ppc_flags = 0;
-
-/* Whether this is Solaris or not. */
-#ifdef TARGET_SOLARIS_COMMENT
-#define SOLARIS_P true
-#else
-#define SOLARIS_P false
-#endif
-
-static bool msolaris = SOLARIS_P;
#endif
#ifdef OBJ_XCOFF
@@ -1247,17 +1225,6 @@ md_parse_option (int c, const char *arg)
set_target_endian = 1;
}
- else if (strcmp (arg, "solaris") == 0)
- {
- msolaris = true;
- ppc_comment_chars = ppc_solaris_comment_chars;
- }
-
- else if (strcmp (arg, "no-solaris") == 0)
- {
- msolaris = false;
- ppc_comment_chars = ppc_eabi_comment_chars;
- }
else if (strcmp (arg, "spe2") == 0)
{
ppc_cpu |= PPC_OPCODE_SPE2;
@@ -1445,10 +1412,6 @@ PowerPC options:\n"));
-mbig, -mbig-endian, -be\n\
generate code for a big endian machine\n"));
fprintf (stream, _("\
--msolaris generate code for Solaris\n"));
- fprintf (stream, _("\
--mno-solaris do not generate code for Solaris\n"));
- fprintf (stream, _("\
-K PIC set EF_PPC_RELOCATABLE_LIB in ELF flags\n"));
fprintf (stream, _("\
-V print assembler version number\n"));
@@ -1891,7 +1854,7 @@ md_begin (void)
#ifdef OBJ_ELF
/* Set the ELF flags if desired. */
- if (ppc_flags && !msolaris)
+ if (ppc_flags)
bfd_set_private_flags (stdoutput, ppc_flags);
#endif
@@ -2359,7 +2322,7 @@ ppc_elf_cons_fix_check (expressionS *exp
}
}
-/* Solaris pseduo op to change to the .rodata section. */
+/* Solaris pseudo op to change to the .rodata section. */
static void
ppc_elf_rdata (int xxx)
{
@@ -226,7 +226,7 @@ extern int ppc_section_flags (flagword,
#define md_elf_section_flags(FLAGS, ATTR, TYPE) ppc_section_flags (FLAGS, ATTR, TYPE)
#define tc_comment_chars ppc_comment_chars
-extern const char *ppc_comment_chars;
+extern const char ppc_comment_chars[];
#define md_elf_section_letter ppc_elf_section_letter
extern bfd_vma ppc_elf_section_letter (int, const char **);
@@ -12187,16 +12187,6 @@ cat >>confdefs.h <<_ACEOF
$as_echo "#define AIX_WEAK_SUPPORT 1" >>confdefs.h
;;
- ppc-*-solaris*)
- if test ${this_target} = $target; then
-
-$as_echo "#define TARGET_SOLARIS_COMMENT 1" >>confdefs.h
-
- fi
- if test x${endian} = xbig; then
- as_fn_error $? "Solaris must be configured little endian" "$LINENO" 5
- fi
- ;;
esac
if test ${this_target} = $target ; then
@@ -298,15 +298,6 @@ changequote([,])dnl
AC_DEFINE(AIX_WEAK_SUPPORT, 1,
[Define if using AIX 5.2 value for C_WEAKEXT.])
;;
- ppc-*-solaris*)
- if test ${this_target} = $target; then
- AC_DEFINE(TARGET_SOLARIS_COMMENT, 1,
- [Define if default target is PowerPC Solaris.])
- fi
- if test x${endian} = xbig; then
- AC_MSG_ERROR(Solaris must be configured little endian)
- fi
- ;;
esac
if test ${this_target} = $target ; then
@@ -539,7 +539,6 @@ gcc(1), ld(1), and the Info entries for
[@b{-mregnames}|@b{-mno-regnames}]
[@b{-mrelocatable}|@b{-mrelocatable-lib}|@b{-K PIC}] [@b{-memb}]
[@b{-mlittle}|@b{-mlittle-endian}|@b{-le}|@b{-mbig}|@b{-mbig-endian}|@b{-be}]
- [@b{-msolaris}|@b{-mno-solaris}]
[@b{-nops=@var{count}}]
@end ifset
@ifset PRU
@@ -193,12 +193,6 @@ Generate code for a little endian machin
@item -mbig, -mbig-endian, -be
Generate code for a big endian machine.
-@item -msolaris
-Generate code for Solaris.
-
-@item -mno-solaris
-Do not generate code for Solaris.
-
@item -nops=@var{count}
If an alignment directive inserts more than @var{count} nops, put a
branch at the beginning to skip execution of the nops.
@@ -242,11 +236,6 @@ line is treated as a comment, but in thi
a logical line number directive (@pxref{Comments}) or a preprocessor
control command (@pxref{Preprocessing}).
-If the assembler has been configured for the ppc-*-solaris* target
-then the @samp{!} character also acts as a line comment character.
-This can be disabled via the @option{-mno-solaris} command-line
-option.
-
@cindex line separator, PowerPC
@cindex statement separator, PowerPC
@cindex PowerPC line separator
@@ -703,7 +703,7 @@ powerpc-*-vxworks*)
powerpc*-*-elf* | powerpc*-*-eabi* | powerpc*-*-sysv* \
| powerpc*-*-linux* | powerpc*-*-netbsd* | powerpc*-*-openbsd* \
| powerpc*-*-rtems* \
- | powerpc*-*-solaris* | powerpc*-*-kaos* | powerpc*-*-vxworks*)
+ | powerpc*-*-kaos* | powerpc*-*-vxworks*)
case "${targ}" in
powerpc64*)
targ_emul=elf64ppc