]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Remove Solaris/SPARC ASM_OUTPUT_ALIGNED_COMMON [PR38118]
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 15 Jan 2026 08:13:34 +0000 (09:13 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 15 Jan 2026 08:13:34 +0000 (09:13 +0100)
sparc/sol2.h has its own definition of ASM_OUTPUT_ALIGNED_COMMON,
overriding the elfos.h version.  This was introduced back in 2010 as a
workaround for a bug in old versions of the Solaris/SPARC assembler (PR
target/38118).  However, even the Solaris 11.4 FCS as, the oldest one
currently supported, doesn't have this bug any longer.  Besides, the
workaround hasn't been effective anymore since GCC 10 without ill
effect.

Therefore the override definition can simply be removed.

Bootstrapped without regression on sparc-sun-solaris2.11 (as and gas).

2026-01-09  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

gcc:
PR target/38118
* config/sparc/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Remove.

gcc/config/sparc/sol2.h

index 754820b3fe28160b0636dd6a89c5fd26c4aaffe3..50eececa3fc44882ceb47d32d42bd69ed74aaf57 100644 (file)
@@ -388,23 +388,6 @@ extern const char *host_detect_local_cpu (int argc, const char **argv);
     }                                                                  \
   while (0)
 
-/* Solaris as has a bug: a .common directive in .tbss or .tdata section
-   behaves as .tls_common rather than normal non-TLS .common.  */
-#undef  ASM_OUTPUT_ALIGNED_COMMON
-#define ASM_OUTPUT_ALIGNED_COMMON(FILE, NAME, SIZE, ALIGN)             \
-  do                                                                   \
-    {                                                                  \
-      if (TARGET_SUN_TLS                                               \
-         && in_section                                                 \
-         && ((in_section->common.flags & SECTION_TLS) == SECTION_TLS)) \
-       switch_to_section (bss_section);                                \
-      fprintf ((FILE), "%s", COMMON_ASM_OP);                           \
-      assemble_name ((FILE), (NAME));                                  \
-      fprintf ((FILE), "," HOST_WIDE_INT_PRINT_UNSIGNED",%u\n",                \
-              (SIZE), (ALIGN) / BITS_PER_UNIT);                        \
-    }                                                                  \
-  while (0)
-
 #if !HAVE_GNU_AS
 /* This is how to output an assembler line that says to advance
    the location counter to a multiple of 2**LOG bytes using the