]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Use -m32/-m64 with Solaris/x86 as
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 15 Jan 2026 10:13:49 +0000 (11:13 +0100)
committerRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
Thu, 15 Jan 2026 10:13:49 +0000 (11:13 +0100)
GCC currently uses -xarch=generic/-xarch=generic64 with Solaris/x86 as
to select either 32 or 64-bit output.  However, -xarch isn't even
documented any longer, but still accepted for compatibility.  Even for
-xchip, only generic is documented, not generic64.

This patch uses -m32/-m64 instead, which is already used in
gcc/configure.ac.

Bootstrapped without regressions on i386-pc-solaris2.11 and
amd64-pc-solaris2.11.

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

gcc:
* config/i386/sol2.h [!HAVE_GNU_AS] (ASM_CPU32_DEFAULT_SPEC): Use -m32.
(ASM_CPU64_DEFAULT_SPEC): Use -m64.

gcc/config/i386/sol2.h

index 63d5006c237b3ff3986dc818ae092a8e8f2ce6af..d727eea41e69f65626c4b1ad69e333cba3a17e32 100644 (file)
@@ -59,13 +59,13 @@ along with GCC; see the file COPYING3.  If not see
   " %{mx32:%e-mx32 is not supported on Solaris}"
 
 /* GNU as understands --32 and --64, but the native Solaris
-   assembler requires -xarch=generic or -xarch=generic64 instead.  */
+   assembler requires -m32 or -m64 instead.  */
 #if HAVE_GNU_AS
 #define ASM_CPU32_DEFAULT_SPEC "--32"
 #define ASM_CPU64_DEFAULT_SPEC "--64"
 #else
-#define ASM_CPU32_DEFAULT_SPEC "-xarch=generic"
-#define ASM_CPU64_DEFAULT_SPEC "-xarch=generic64"
+#define ASM_CPU32_DEFAULT_SPEC "-m32"
+#define ASM_CPU64_DEFAULT_SPEC "-m64"
 #endif
 
 #if !HAVE_GNU_AS