]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
aix: Alias -m64 to -maix64 and -m32 to -maix32.
authorDavid Edelsohn <dje.gcc@gmail.com>
Tue, 27 Apr 2021 20:09:07 +0000 (16:09 -0400)
committerDavid Edelsohn <dje.gcc@gmail.com>
Tue, 27 Apr 2021 23:54:00 +0000 (19:54 -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.

gcc/config/rs6000/aix.h
gcc/config/rs6000/aix64.opt

index b116e1a36bb0cda3d0c1868d0dcc8c38efa34ba3..662785cc7db34e3c37f687e5457fcb249115da5c 100644 (file)
 #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"
index 7673c91e0135f73a9d7f9ab71c01fd2097ef5b92..15d863fa0a2b8e34881891f479f20bd87361c52e 100644 (file)
@@ -53,3 +53,9 @@ Driver
 
 pthread
 Driver
+
+m64
+Driver
+
+m32
+Driver