https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106680
--- Comment #9 from Kewen Lin <linkw at gcc dot gnu.org> ---
Note that now we only disable implicit powerpc64 for -m32 when the
OS_MISSING_POWERPC64 is set.
/* Don't expect powerpc64 enabled on those OSes with OS_MISSING_POWERPC64,
since they do not save and restore the high half of the GPRs correctly
in all cases. If the user explicitly specifies it, we won't interfere
with the user's specification. */
#ifdef OS_MISSING_POWERPC64
if (OS_MISSING_POWERPC64
&& TARGET_32BIT
&& TARGET_POWERPC64
&& !(rs6000_isa_flags_explicit & OPTION_MASK_POWERPC64))
rs6000_isa_flags &= ~OPTION_MASK_POWERPC64;
#endif
But rtems.h doesn't define OS_MISSING_POWERPC64
gcc/config/rs6000/linux.h:#define OS_MISSING_POWERPC64 1
gcc/config/rs6000/freebsd64.h:#define OS_MISSING_POWERPC64 !TARGET_64BIT
gcc/config/rs6000/aix.h:#define OS_MISSING_POWERPC64 1
gcc/config/rs6000/linux64.h:#define OS_MISSING_POWERPC64 !TARGET_64BIT
meanwhile cpu "e6500" has MASK_POWERPC64 set by default (it's 64bit core).
That's why you still have powerpc64 flag set when you specify -m32 on rtems.