https://gcc.gnu.org/g:6c83daecb0f8b82377f635a03956eff337d57843

commit 6c83daecb0f8b82377f635a03956eff337d57843
Author: Michael Meissner <meiss...@linux.ibm.com>
Date:   Wed Nov 6 16:52:07 2024 -0500

    Set default name to power8 if no --with-cpu.
    
    2024-11-06  Michael Meissner  <meiss...@linux.ibm.com>
    
    gcc/
    
            * config/rs6000/default64.h (TARGET_CPU_DEFAULT): Set default cpu 
name.

Diff:
---
 gcc/config/rs6000/default64.h | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/gcc/config/rs6000/default64.h b/gcc/config/rs6000/default64.h
index 10e3dec78aca..afa6542e040c 100644
--- a/gcc/config/rs6000/default64.h
+++ b/gcc/config/rs6000/default64.h
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3.  If not see
 #define RS6000_CPU(NAME, CPU, FLAGS)
 #include "rs6000-cpus.def"
 #undef RS6000_CPU
+#undef TARGET_CPU_DEFAULT
 
 #if (TARGET_DEFAULT & MASK_LITTLE_ENDIAN)
 #undef TARGET_DEFAULT
@@ -28,10 +29,20 @@ along with GCC; see the file COPYING3.  If not see
                        | MASK_LITTLE_ENDIAN)
 #undef ASM_DEFAULT_SPEC
 #define ASM_DEFAULT_SPEC "-mpower8"
+#define TARGET_CPU_DEFAULT "power8"
+
 #else
 #undef TARGET_DEFAULT
 #define TARGET_DEFAULT (OPTION_MASK_PPC_GFXOPT | OPTION_MASK_PPC_GPOPT \
                        | OPTION_MASK_MFCRF | MASK_POWERPC64 | MASK_64BIT)
 #undef ASM_DEFAULT_SPEC
 #define ASM_DEFAULT_SPEC "-mpower4"
+
+#if (TARGET_DEFAULT & MASK_POWERPC64)
+#define TARGET_CPU_DEFAULT "powerpc64"
+
+#else
+#define TARGET_CPU_DEFAULT "powerpc"
+#endif
+
 #endif

Reply via email to