From 38504923383f5d1c97d36705a05408c85aef091d Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Thu, 21 Jan 2021 11:28:09 +0000
Subject: [PATCH] Darwin, Arm64 : Allow m64 on the command line.

It seems that some people have makefiles etc. that put '-m64' for
arm64 Darwin.  This is allowed by clang.  For the GCC version we make it
an alias of -mabi=darwinpcs.

(cherry picked from commit cd8ba743bf5fa020b38b724ae7a2c09ae930ea52)
Signed-off-by: Kirill A. Korinsky <kirill@korins.ky>
---
 gcc/config/aarch64/aarch64.opt | 4 ++++
 1 file changed, 4 insertions(+)

diff --git gcc/config/aarch64/aarch64.opt gcc/config/aarch64/aarch64.opt
index 85f98ad6384..feec59a68e4 100644
--- gcc/config/aarch64/aarch64.opt
+++ gcc/config/aarch64/aarch64.opt
@@ -155,6 +155,10 @@ Enum(aarch64_abi) String(lp64) Value(AARCH64_ABI_LP64)
 EnumValue
 Enum(aarch64_abi) String(darwinpcs) Value(AARCH64_ABI_LP64)
 
+m64
+Target RejectNegative Alias(mabi=, darwinpcs)
+On Darwin for compatibility with other platform variants.
+
 mpc-relative-literal-loads
 Target Report Save Var(pcrelative_literal_loads) Init(2) Save
 PC relative literal loads.
-- 
2.42.1

