From patchwork Wed May 16 19:42:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Brodkin X-Patchwork-Id: 914897 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-477784-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=synopsys.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="DzvqDvPS"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40mPx52b5Qz9s19 for ; Thu, 17 May 2018 05:43:03 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; q=dns; s=default; b=eO+SWOpxmJ+3 h0IRHTuQ9KYCdWjwoDC3YrVZSlTV1nWmC5gWvvTUXXmuQayr8Hc9Mitbeh0/XAyU EOrspBqnOSBVA1HjQFceKmjmyXnr9I2uRk8djPh3n8rv/ipXu2FOHxxAKYgSIRyO oD+cVlquhv26xSM3taW4IKkxD+f46FE= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id; s=default; bh=EjuAOurSdSWfkCd0nF YFzsO7YjM=; b=DzvqDvPSGo8VrnvhP/jYM6ywXfTSZhh/bhHE+0YLZbT8Qb+SOa qjMjLeaIVSEj9valyFYQG3d2xZMhuJY64uV7B4Z5uz2YClUb0QCgBfgOrXIcs7hh r//Qs74IA/6AvB/L7nhOXtIOgnzCiKdTm705K6sThLa7oRubrk78LxVqY= Received: (qmail 23606 invoked by alias); 16 May 2018 19:42:55 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 23589 invoked by uid 89); 16 May 2018 19:42:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_SHORT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 spammy=H*RU:sk:mailhos, Hx-spam-relays-external:sk:mailhos X-HELO: smtprelay.synopsys.com Received: from smtprelay.synopsys.com (HELO smtprelay.synopsys.com) (198.182.60.111) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 16 May 2018 19:42:53 +0000 Received: from mailhost.synopsys.com (mailhost2.synopsys.com [10.13.184.66]) by smtprelay.synopsys.com (Postfix) with ESMTP id 0B39E10C04AA; Wed, 16 May 2018 12:42:51 -0700 (PDT) Received: from abrodkin-7480l.internal.synopsys.com (unknown [10.225.15.87]) by mailhost.synopsys.com (Postfix) with ESMTP id 31E584B5B; Wed, 16 May 2018 12:42:49 -0700 (PDT) From: Alexey Brodkin To: gcc-patches@gcc.gnu.org Cc: Claudiu Zissulescu , Andrew Burgess , Alexey Brodkin Subject: [PATCH] ARC: Add multilib support for linux targets Date: Wed, 16 May 2018 22:42:36 +0300 Message-Id: <20180516194236.24690-1-abrodkin@synopsys.com> We used to build baremetal (AKA Elf32) multilibbed toolchains for years now but never made that for Linux targets since there were problems with uClibc n multilib setup. Now with help of Crosstool-NG it is finally possible to create uClibc-based multilibbed toolchains and so we add relevant CPUs for multilib in case of configuration for "arc*-*-linux*". This will be essentially useful for glibc-based multilibbbed toolchains in the future. gcc/ 2018-05-16 Alexey Brodkin * config.gcc: Add arc/t-multilib-linux to tmake_file for arc*-*-linux*. * config/arc/t-multilib-linux: Specify MULTILIB_OPTIONS and MULTILIB_DIRNAMES --- gcc/config.gcc | 2 +- gcc/config/arc/t-multilib-linux | 25 +++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 gcc/config/arc/t-multilib-linux diff --git a/gcc/config.gcc b/gcc/config.gcc index a5defb0f0058..8e038a72f613 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1059,7 +1059,7 @@ arc*-*-elf*) ;; arc*-*-linux*) tm_file="arc/arc-arch.h dbxelf.h elfos.h gnu-user.h linux.h linux-android.h glibc-stdint.h arc/linux.h ${tm_file}" - tmake_file="${tmake_file} arc/t-arc" + tmake_file="${tmake_file} arc/t-multilib-linux arc/t-arc" extra_gcc_objs="driver-arc.o" if test "x$with_cpu" != x; then tm_defines="${tm_defines} TARGET_CPU_BUILD=PROCESSOR_$with_cpu" diff --git a/gcc/config/arc/t-multilib-linux b/gcc/config/arc/t-multilib-linux new file mode 100644 index 000000000000..f357cfc3f926 --- /dev/null +++ b/gcc/config/arc/t-multilib-linux @@ -0,0 +1,25 @@ +# Copyright (C) 2018 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 +# . + +MULTILIB_OPTIONS = mcpu=hs/mcpu=archs/mcpu=hs38/mcpu=hs38_linux/mcpu=arc700/mcpu=nps400 + +MULTILIB_DIRNAMES = hs archs hs38 hs38_linux arc700 nps400 + +# Aliases: +MULTILIB_MATCHES += mcpu?arc700=mA7 +MULTILIB_MATCHES += mcpu?arc700=mARC700