From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by sourceware.org (Postfix) with ESMTPS id 51AFF3858C39 for ; Thu, 7 Sep 2023 13:38:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 51AFF3858C39 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-wr1-x42c.google.com with SMTP id ffacd0b85a97d-31c6d17aec4so936820f8f.1 for ; Thu, 07 Sep 2023 06:38:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1694093911; x=1694698711; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to; bh=TzdKy1DlavMs/r+cjN71Skpn9yKNySppa7x5Pzc5xGk=; b=aSH//mNWed3UqgOtaHmb89ha0J2IB1jbVah3+jelhvsSMHPAKv8nv8IzlglTvi64Cc NI5hCaWKzsAiSB0fsxRZ/O1dLuM3A+Kcot+8KMqsAia8nG+IIl3wUz7vvZAOIAQMu2MD QnnxtRv0d1dzL57R5NZsZUUAcRcpqp999154mQ5IGJwpDkh9HBsc7mv+ZJIYdlzku/J8 4KIrUnCZsahSvDvloLNqLCPalLWdEnRAr7En4as6OPKt1FkvlufHQ9G2FA79Rje9nTal R+neASST7Ltjx+5FC4XmC50yObluGrZ0MxQxks/Vh+JZEqU5Rjvr11mXEmw2j1i+8zO8 0A5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1694093911; x=1694698711; h=content-transfer-encoding:mime-version:reply-to:references :in-reply-to:message-id:date:subject:cc:to:from:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=TzdKy1DlavMs/r+cjN71Skpn9yKNySppa7x5Pzc5xGk=; b=XyDYdbNfS5Y+/2hMHUnW0j1Pa1g9M8ex+FH6E6KqJzh5xxiW+7aUS07/xHfBCDrXlP ycv8HcF89YUIuuGq/du09RsXB3UjFqnt0OXmd9QXmqiASbzeA5jI0f/Fu4pcfP0ptgq+ IjyebJ/oMWAgr9X0jAQrlkdHFB9ESCI2FFGxVeKX20KnnHC5oIyudo6z/wOmJ8HRt81M L+YO196J/FR30Z++1do8yixNnhL8c2l15vID5xgqE8PDkavHpZ56iGm7HJcW8kD6texf ztKfixjCc/wT9ZEojEan+qiQmA6UMK6u7oZ4q09ymOIVAawrLhSQXB4tNzFTqLU9ZxWN rFLg== X-Gm-Message-State: AOJu0Yxt7pcOTI4FGefkMh3/KOPQIFUl3Z1ZjbmgRZ9qDY0XP9+kN2Lp ZYeCiPkTlGAC81BVaAFaJkeTG/vvdwdWT9sVvA== X-Google-Smtp-Source: AGHT+IESgB3WH+dkfoC5JJNsY0c9hicj60oUmhVx0cB7i9PMj2AoIH0HNKHhfnfATUrwIUE+SimuKQ== X-Received: by 2002:adf:fa82:0:b0:31d:366d:4961 with SMTP id h2-20020adffa82000000b0031d366d4961mr5474510wrr.25.1694093911175; Thu, 07 Sep 2023 06:38:31 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id bt12-20020a056000080c00b0031433443265sm17693052wrb.53.2023.09.07.06.38.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Sep 2023 06:38:30 -0700 (PDT) From: arthur.cohen@embecosm.com To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, ibuclaw@gdcproject.org Subject: [PATCH 09/14] rust: Implement TARGET_RUST_OS_INFO for *-*-solaris2*. Date: Thu, 7 Sep 2023 15:36:35 +0200 Message-ID: <20230907133729.2518969-10-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230907133729.2518969-2-arthur.cohen@embecosm.com> References: <20230907133729.2518969-2-arthur.cohen@embecosm.com> Reply-To: arthur.cohen@embecosm.com MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-14.4 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: From: Iain Buclaw gcc/ChangeLog: * config.gcc (*-*-solaris2*): Set rust_target_objs and target_has_targetrustm. * config/t-sol2 (sol2-rust.o): New rule. * config/sol2-rust.cc: New file. --- gcc/config.gcc | 2 ++ gcc/config/sol2-rust.cc | 40 ++++++++++++++++++++++++++++++++++++++++ gcc/config/t-sol2 | 5 +++++ 3 files changed, 47 insertions(+) create mode 100644 gcc/config/sol2-rust.cc diff --git a/gcc/config.gcc b/gcc/config.gcc index f2b4381362c..81142763ac2 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -1056,6 +1056,8 @@ case ${target} in ;; esac target_has_targetdm=yes + rust_target_objs="${rust_target_objs} sol2-rust.o" + target_has_targetrustm=yes ;; *-*-*vms*) extra_options="${extra_options} vms/vms.opt" diff --git a/gcc/config/sol2-rust.cc b/gcc/config/sol2-rust.cc new file mode 100644 index 00000000000..e36bd450bcc --- /dev/null +++ b/gcc/config/sol2-rust.cc @@ -0,0 +1,40 @@ +/* Solaris support needed only by Rust front-end. + Copyright (C) 2022 Free Software Foundation, Inc. + +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 +. */ + +#include "config.h" +#include "system.h" +#include "coretypes.h" +#include "tm.h" +#include "tm_rust.h" +#include "rust/rust-target.h" +#include "rust/rust-target-def.h" + +/* Implement TARGET_RUST_OS_INFO for Solaris targets. */ + +static void +solaris_rust_target_os_info (void) +{ + rust_add_target_info ("target_family", "unix"); + rust_add_target_info ("target_os", "solaris"); + rust_add_target_info ("target_vendor", "sun"); + rust_add_target_info ("target_env", ""); +} + +#undef TARGET_RUST_OS_INFO +#define TARGET_RUST_OS_INFO solaris_rust_target_os_info + +struct gcc_targetrustm targetrustm = TARGETRUSTM_INITIALIZER; diff --git a/gcc/config/t-sol2 b/gcc/config/t-sol2 index 83d4c85fdeb..d454409d346 100644 --- a/gcc/config/t-sol2 +++ b/gcc/config/t-sol2 @@ -31,6 +31,11 @@ sol2-d.o: $(srcdir)/config/sol2-d.cc $(COMPILE) $< $(POSTCOMPILE) +# Solaris-specific Rust support. +sol2-rust.o: $(srcdir)/config/sol2-rust.cc + $(COMPILE) $< + $(POSTCOMPILE) + # Corresponding stub routines. sol2-stubs.o: $(srcdir)/config/sol2-stubs.cc $(COMPILE) $< -- 2.42.0