aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2021-04-27 16:09:07 -0400
committerDavid Edelsohn <dje.gcc@gmail.com>2021-04-27 19:54:00 -0400
commit0366e2b40e9ea5fc61c9a694de0c8c76a238b03c (patch)
tree8bc975d6572ffb1324145e0d67cd10ec624f07ca /gcc
parent37846c42f1f5ac4d9ba190d49c4373673c89c8b5 (diff)
downloadgcc-0366e2b40e9ea5fc61c9a694de0c8c76a238b03c.zip
gcc-0366e2b40e9ea5fc61c9a694de0c8c76a238b03c.tar.gz
gcc-0366e2b40e9ea5fc61c9a694de0c8c76a238b03c.tar.bz2
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.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config/rs6000/aix.h6
-rw-r--r--gcc/config/rs6000/aix64.opt6
2 files changed, 12 insertions, 0 deletions
diff --git a/gcc/config/rs6000/aix.h b/gcc/config/rs6000/aix.h
index b116e1a..662785c 100644
--- a/gcc/config/rs6000/aix.h
+++ b/gcc/config/rs6000/aix.h
@@ -280,3 +280,9 @@
#define RS6000_USE_DWARF_NUMBERING
#define TARGET_PRECOMPUTE_TLS_P rs6000_aix_precompute_tls_p
+
+/* Replace -m64 with -maix64 and -m32 with -maix32. */
+#undef SUBTARGET_DRIVER_SELF_SPECS
+#define SUBTARGET_DRIVER_SELF_SPECS \
+"%{m64:-maix64} %<m64", \
+"%{m32:-maix32} %<m32"
diff --git a/gcc/config/rs6000/aix64.opt b/gcc/config/rs6000/aix64.opt
index 7673c91..15d863f 100644
--- a/gcc/config/rs6000/aix64.opt
+++ b/gcc/config/rs6000/aix64.opt
@@ -53,3 +53,9 @@ Driver
pthread
Driver
+
+m64
+Driver
+
+m32
+Driver