From patchwork Fri Sep 17 15:26:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuta Saito X-Patchwork-Id: 45129 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 155A03857000 for ; Fri, 17 Sep 2021 15:27:09 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 155A03857000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1631892429; bh=5pGdVPNvlw/ZHNKxWFU8eqjop4ZTUZBshGsKDIMe/kM=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=iAA6hQEkwhMs8DzFJNvI4UNhDT3Ly0JmT/RttKZDYZSqrUXOL79shyuX69QEF+0Fe ZHH9JAc+NZMhGQntFZQuEVOMlJD0mNYFhi9JQ+EEMu8aa1/GhaeGICvrcXeIRYuBMT Xkra7jT16ii2Qsn11wocdLbO4BGqXGor0iHdMSOE= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by sourceware.org (Postfix) with ESMTPS id C18C33858D29 for ; Fri, 17 Sep 2021 15:26:39 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C18C33858D29 Received: by mail-pj1-x1031.google.com with SMTP id il14-20020a17090b164e00b0019c7a7c362dso3686239pjb.0 for ; Fri, 17 Sep 2021 08:26:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=5pGdVPNvlw/ZHNKxWFU8eqjop4ZTUZBshGsKDIMe/kM=; b=2AFX1D5uzcD2k3Oa79YU+FI8OVJ+kTRXPtt+hwSbCWHxWXBcFRy2zT+LGvAjTKnqO7 UUiHJ0pZDfBcYDVNg7duVNpXoOzBOecpG5MLPcb4HSw/vtWDmvKbkkK4MqhThoKyCjJN MP6bBqOoHsQ9Z3/OrlCUJVHu1U+2pn3kj/l5Uw/et2v9oeOVuXl0vQLbU84ihl+r8ov+ AsuXma+BMc9oYWohUj5hx19FTE0No2t2oqOsNSyL94ZrMZVPDXaztTze96ZIbgFgMJcu zUxi0qdWJ2aRGS6Ue0YN/j94tZ/upBP33dUuAuo2mKkJMuAM/cPC7KPSjwKkdAiuUJt1 BAqA== X-Gm-Message-State: AOAM533n2nKeq3LTTrYQwLkLgjwxk5c4sclJZtbO/Ehjd7G04PFqyZ5e jrbAuQytCkh7T9UQe3F6zSIaR0mRd3mjOopd X-Google-Smtp-Source: ABdhPJxpnDtusKEUs78LNJMf38/TKADxJyz/B+0Bamh0tn8k3NtV7eFHYD/vPOMwvAfA578UU/REJw== X-Received: by 2002:a17:902:d492:b0:13b:7935:d990 with SMTP id c18-20020a170902d49200b0013b7935d990mr10030137plg.7.1631892398505; Fri, 17 Sep 2021 08:26:38 -0700 (PDT) Received: from localhost.localdomain ([240f:73:2434:1:e401:d3cc:593e:c593]) by smtp.gmail.com with ESMTPSA id 207sm6552808pfu.56.2021.09.17.08.26.36 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Sep 2021 08:26:37 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] darwin: support aarch64-darwin host Date: Sat, 18 Sep 2021 00:26:22 +0900 Message-Id: <20210917152621.54651-1-kateinoigakukun@gmail.com> X-Mailer: git-send-email 2.24.3 (Apple Git-128) MIME-Version: 1.0 X-Spam-Status: No, score=-12.9 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, GIT_PATCH_0, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Yuta Saito via Gcc-patches From: Yuta Saito Reply-To: Yuta Saito Cc: Yuta Saito Errors-To: gcc-patches-bounces+patchwork=sourceware.org@gcc.gnu.org Sender: "Gcc-patches" Hi, Currently, building gcc for aarch64-darwin host fails due to missing host_hooks definition. This patch adds host_hooks definition for aarch64-darwin. aarch64-darwin is not supported as a target yet, but this allows using gcc cross-compiler on aarch64-darwin. I confirmed linking gcc-cross succeed on aarch64 darwin. gcc/ChangeLog: * config.host: Add aarch64-darwin host support. * config/aarch64/host-aarch64-darwin.c: New file. * config/aarch64/x-darwin: Ditto. Signed-off-by: Yuta Saito --- gcc/config.host | 4 +++ gcc/config/aarch64/host-aarch64-darwin.c | 32 ++++++++++++++++++++++++ gcc/config/aarch64/x-darwin | 3 +++ 3 files changed, 39 insertions(+) create mode 100644 gcc/config/aarch64/host-aarch64-darwin.c create mode 100644 gcc/config/aarch64/x-darwin diff --git a/gcc/config.host b/gcc/config.host index 0a02c33cc80..f419ee7c94c 100644 --- a/gcc/config.host +++ b/gcc/config.host @@ -263,6 +263,10 @@ case ${host} in out_host_hook_obj="${out_host_hook_obj} host-ppc64-darwin.o" host_xmake_file="${host_xmake_file} rs6000/x-darwin64" ;; + aarch64-*-darwin*) + out_host_hook_obj="${out_host_hook_obj} host-aarch64-darwin.o" + host_xmake_file="${host_xmake_file} aarch64/x-darwin" + ;; rs6000-ibm-aix* | powerpc-ibm-aix*) host_xmake_file="${host_xmake_file} rs6000/x-aix" ;; diff --git a/gcc/config/aarch64/host-aarch64-darwin.c b/gcc/config/aarch64/host-aarch64-darwin.c new file mode 100644 index 00000000000..388a8ebcc49 --- /dev/null +++ b/gcc/config/aarch64/host-aarch64-darwin.c @@ -0,0 +1,32 @@ +/* aarch64-darwin host-specific hook definitions. + Copyright (C) 2006-2021 Free Software Foundation, Inc. + +This file is part of GCC. + +GCC is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free +Software Foundation; either version 3, or (at your option) any later +version. + +GCC is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +for more details. + +You should have received a copy of the GNU General Public License +along with GCC; see the file COPYING3. If not see +. */ + +#define IN_TARGET_CODE 1 + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "hosthooks.h" +#include "hosthooks-def.h" +#include "config/host-darwin.h" + +/* Darwin doesn't do anything special for aarch64 hosts; this file exists just + to include config/host-darwin.h. */ + +const struct host_hooks host_hooks = HOST_HOOKS_INITIALIZER; diff --git a/gcc/config/aarch64/x-darwin b/gcc/config/aarch64/x-darwin new file mode 100644 index 00000000000..6d788d5e89c --- /dev/null +++ b/gcc/config/aarch64/x-darwin @@ -0,0 +1,3 @@ +host-aarch64-darwin.o : $(srcdir)/config/aarch64/host-aarch64-darwin.c + $(COMPILE) $< + $(POSTCOMPILE)