https://gcc.gnu.org/g:4be7598a67f6cbe3a1d872b9dd1ec5b2ac7de402
commit r16-6797-g4be7598a67f6cbe3a1d872b9dd1ec5b2ac7de402 Author: Rainer Orth <[email protected]> Date: Thu Jan 15 09:13:34 2026 +0100 Remove Solaris/SPARC ASM_OUTPUT_ALIGNED_COMMON [PR38118] 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 <[email protected]> gcc: PR target/38118 * config/sparc/sol2.h (ASM_OUTPUT_ALIGNED_COMMON): Remove. Diff: --- gcc/config/sparc/sol2.h | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/gcc/config/sparc/sol2.h b/gcc/config/sparc/sol2.h index 754820b3fe28..50eececa3fc4 100644 --- a/gcc/config/sparc/sol2.h +++ b/gcc/config/sparc/sol2.h @@ -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
