From 7f37c47c1eb4d84badba67bc81a6879f6676faf1 Mon Sep 17 00:00:00 2001 From: David Edelsohn Date: Fri, 30 Apr 2021 14:09:13 -0400 Subject: [PATCH] aix: Alias -m64 to -maix64 and -m32 to -maix32. GCC on AIX historically has used -maix64 and -maix32 to switch to 64 bit mode or 32 bit mode, unlike other ports that use -m64 and -m32. The Alias() directive for options cannot be used because aix64 is expected in multiple parts of the compiler infrastructure and one cannot switch to -m64 due to backward compatibility. This patch defines DRIVER_SELF_SPECS to translate -m64 to -maix64 and -m32 to -maix32 so that the command line option compatible with other targets can be used while continuing to allow the historical options. gcc/ChangeLog: * config/rs6000/aix.h (SUBTARGET_DRIVER_SELF_SPECS): New. * config/rs6000/aix64.opt (m64): New. (m32): New. (cherry picked from commit 0366e2b40e9ea5fc61c9a694de0c8c76a238b03c) --- gcc/config/rs6000/aix.h | 5 +++++ gcc/config/rs6000/aix64.opt | 6 ++++++ 2 files changed, 11 insertions(+) diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h index 7fccb31307bb..2d20fcad8dec 100644 --- a/gcc/config/rs6000/aix.h +++ b/gcc/config/rs6000/aix.h @@ -279,3 +279,8 @@ /* Use standard DWARF numbering for DWARF debugging information. */ #define RS6000_USE_DWARF_NUMBERING +/* Replace -m64 with -maix64 and -m32 with -maix32. */ +#undef SUBTARGET_DRIVER_SELF_SPECS +#define SUBTARGET_DRIVER_SELF_SPECS \ +"%{m64:-maix64} %