]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aix: Alias -m64 to -maix64 and -m32 to -maix32.
authorDavid Edelsohn <dje.gcc@gmail.com>
Fri, 30 Apr 2021 18:09:13 +0000 (14:09 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Fri, 30 Apr 2021 18:11:53 +0000 (14:11 -0400)
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
gcc/config/rs6000/aix64.opt

index 7fccb31307bbd4098d00f62f66d304800598863e..2d20fcad8dec60fc454074ba54ae90eaa45befbe 100644 (file)
 /* 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} %<m64",                        \
+"%{m32:-maix32} %<m32"
index 7673c91e0135f73a9d7f9ab71c01fd2097ef5b92..15d863fa0a2b8e34881891f479f20bd87361c52e 100644 (file)
@@ -53,3 +53,9 @@ Driver
 
 pthread
 Driver
+
+m64
+Driver
+
+m32
+Driver