From patchwork Wed Oct 25 11:06:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1855004 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=ItOSj20T; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SFmMr6QLkz23jV for ; Wed, 25 Oct 2023 22:06:48 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D1293385DC0A for ; Wed, 25 Oct 2023 11:06:46 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by sourceware.org (Postfix) with ESMTPS id 3C7E7385840D for ; Wed, 25 Oct 2023 11:06:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 3C7E7385840D Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 3C7E7385840D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32a ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698231996; cv=none; b=kCjSsi1Dhr3SgRmNF7vOEYZzpd1HP8YGd8XV2l5gQxwW8fCPjQ2aWe9aV7Qmc+n+OYaHrrcA/X4xIzA4zoCpqKSOfzvuVSWOuNYNgnPLutvy8VouAjCrT4cQki2R4p+aBkAAxMnbthPvdmREKPh8n583JmLRjKBk0MucJvvg3fU= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698231996; c=relaxed/simple; bh=ydSS4FVgqhOTcK87EVRlb0W1FqlNwxHI//hT8aC316s=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Q6aR+Nq7OojpN5Gqnne4cyU2T0dbeC+tAZkvUmSgNWK1tDH9Fd+f+dwgqnFtmr+O2zPVRRuouqpnutMd8UIGB0ORAa26GM7KT4PVVV+steQbETNMcYXq3peD+rs41MnTlO//vjG4nKuoN2BDhQYVtyFwm/TFi5Cwqooe4EuI7Rk= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-40838915cecso45289905e9.2 for ; Wed, 25 Oct 2023 04:06:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1698231991; x=1698836791; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=fsqMvO+xbMp6CMsPXzJ1KRaTrC4cg1oiGY0RNkQC0t8=; b=ItOSj20TFGUBIOZERTZVyN0fV8SPkyOkDwGeWoy2VxK3QAG4wdKOfLgV3zidzlaNh0 iNr1P9O/FQYhUbqXvuw84nA8IoX6qn9ZZLxeZCAdNwbtdoWIae1MPDYDEv2vVSBdTOkb xy1KmR0zBkAPpj0BKatZVx1hnNQ+DcGdGsqK4MPOmvqyZ3Jk67OdI+Uzo2Hlb2gwccSq WyHHBG8IY/ssQIPfyMBZS23ysc9HyB8NpKHOnfbi5E496LBbJuBoZVaXllGujTP5/KVj e5R86uYTJh6ket59pLXgNe7Zl1ZTd1DynVW4E69FV61EQHkud6xl6CXcaGC/x0QZ/APP RL3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698231991; x=1698836791; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=fsqMvO+xbMp6CMsPXzJ1KRaTrC4cg1oiGY0RNkQC0t8=; b=cJymtOEeb2ehqM96GX3JDtsBqbICk2fNGSRFy/7YQLrnrIrzBPNM7jpWSzpD4MTQC6 y6AQ/750/XwaoNFtBK4t4c/WWaoMPx7gdPOR+3sbviGEVxoOapKxC4ImYQO0geSSK5RE XdoJQHbT82lqHMNYsNoHQDmwiSJ4OPYfh+OWF4hUXZtbHbX0WCxxNLSgTm4IwXu2uj6v X8QAPXvrj3YlDefJOW7/okVMpcnQB+fFNSsloW8SXrW2rmIifUs97EeS8aoBZoMDK5ZU f9qBnNOIo5NzRWvWH1Bfd2e4pIOQii2YND99ndHUaiSVMs/sphGozCJ6KlryzcO3/UOv XoIw== X-Gm-Message-State: AOJu0YwHOWp7a4T8NvHkSftKSY5/ewR78+P43WQid90UYLKpGKooZ6Kg FQARmNylLCPmyHc9sfjE8wwNKIYFtNYHABr1M9aE X-Google-Smtp-Source: AGHT+IEElA6JoTZUrPJdOJ5/eQa/SMKGWlw1VO+PgOY/cAScqcmJobuC+OSCPojmOUaZ+ZD9M3BH4w== X-Received: by 2002:a05:600c:4e91:b0:408:7abb:b0ee with SMTP id f17-20020a05600c4e9100b004087abbb0eemr7767683wmq.26.1698231991207; Wed, 25 Oct 2023 04:06:31 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id bi9-20020a05600c3d8900b003fc16ee2864sm14263608wmb.48.2023.10.25.04.06.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 04:06:30 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Arthur Cohen , Pierre-Emmanuel Patry Subject: [PATCH v2 1/4] libgrust: Add entry for maintainers and stub changelog file. Date: Wed, 25 Oct 2023 13:06:44 +0200 Message-ID: <20231025110658.1232737-1-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.0 MIME-Version: 1.0 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, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org ChangeLog: * MAINTAINERS: Add maintainers for libgrust. contrib/ChangeLog: * gcc-changelog/git_commit.py: Add libgrust. * gcc_update: Add libgrust file dependencies Co-authored-by: Pierre-Emmanuel Patry --- MAINTAINERS | 1 + contrib/gcc-changelog/git_commit.py | 1 + contrib/gcc_update | 4 ++++ libgrust/ChangeLog | 6 ++++++ 4 files changed, 12 insertions(+) create mode 100644 libgrust/ChangeLog diff --git a/MAINTAINERS b/MAINTAINERS index 4401086fb6c..d2bdde71d27 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -182,6 +182,7 @@ libgo Ian Lance Taylor libgomp Jakub Jelinek libgomp Tobias Burnus libgomp (OpenACC) Thomas Schwinge +libgrust All Rust front end maintainers libiberty Ian Lance Taylor libitm Torvald Riegel libobjc Nicola Pero diff --git a/contrib/gcc-changelog/git_commit.py b/contrib/gcc-changelog/git_commit.py index 9110317a759..4e601fa1f63 100755 --- a/contrib/gcc-changelog/git_commit.py +++ b/contrib/gcc-changelog/git_commit.py @@ -69,6 +69,7 @@ default_changelog_locations = { 'libgfortran', 'libgm2', 'libgomp', + 'libgrust', 'libhsail-rt', 'libiberty', 'libitm', diff --git a/contrib/gcc_update b/contrib/gcc_update index cda2bdb0df9..774c926e723 100755 --- a/contrib/gcc_update +++ b/contrib/gcc_update @@ -153,6 +153,10 @@ libgomp/testsuite/Makefile.in: libgomp/testsuite/Makefile.am libgomp/aclocal.m4 libgomp/configure.ac: libgomp/plugin/configfrag.ac libgomp/configure: libgomp/configure.ac libgomp/aclocal.m4 libgomp/config.h.in: libgomp/configure.ac libgomp/aclocal.m4 +libgrust/Makefile.in: libgrust/Makefile.am libgrust/aclocal.m4 +libgrust/aclocal.m4: libgrust/configure.ac +libgrust/configure: libgrust/configure.ac libgrust/aclocal.m4 +libgrust/libproc_macro_internal/Makefile.in: libgrust/libproc_macro_internal/Makefile.am libgrust/aclocal.m4 libitm/aclocal.m4: libitm/configure.ac libitm/acinclude.m4 libitm/Makefile.in: libitm/Makefile.am libitm/aclocal.m4 libitm/testsuite/Makefile.in: libitm/testsuite/Makefile.am libitm/aclocal.m4 diff --git a/libgrust/ChangeLog b/libgrust/ChangeLog new file mode 100644 index 00000000000..97887c90552 --- /dev/null +++ b/libgrust/ChangeLog @@ -0,0 +1,6 @@ + +Copyright (C) 2023 Free Software Foundation, Inc. + +Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. From patchwork Wed Oct 25 11:06:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1855005 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=DMb0Gp3r; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SFmN24w46z23jV for ; Wed, 25 Oct 2023 22:06:58 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 408A9385DC02 for ; Wed, 25 Oct 2023 11:06:56 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x32c.google.com (mail-wm1-x32c.google.com [IPv6:2a00:1450:4864:20::32c]) by sourceware.org (Postfix) with ESMTPS id AC7A7385703F for ; Wed, 25 Oct 2023 11:06:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AC7A7385703F Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org AC7A7385703F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::32c ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698232005; cv=none; b=imTzP2NAI5X0/Rr7UhnTUYFoSKENYMJ+zGD96QKNfVHIW36Ga1jZBZMJ8T8woF4hXU8tyImzVQl5CJVtBHNt7SMpsvs9LnT9sxwcYf/fSyRsaaHTYqYcKObhwqZ5OvWE81K1xAWxEJxGuhu0bjF1m1nAfYS/x74AqJgxtZA++vo= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698232005; c=relaxed/simple; bh=sBDP2B8XWpXR1hBorKcuWIigKKYnbT/smLBRC6YVm2A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bcEDVBi1XSRdR0p03+gZ9MdjTVIm9GmwzdRF/JQhiZJpKpCTzp777OPOIS1U/KoMSalBzaqhfVc58ERNmVcIHDiy0CnFOqf8l5QwH8CJH4vFpglYPOPXZBY0zg0QxeWna/6Cr/SKqE3IH7Tpot6tw5sp3NHIcawB0vl4pFy8vR8= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-407da05f05aso40617985e9.3 for ; Wed, 25 Oct 2023 04:06:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1698232002; x=1698836802; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=vaY3nfvfmbzYDJbqOWLH5VazHNV+dHpgd5Bxd72/usE=; b=DMb0Gp3rFsnoGB410vd2UtGhaXY01rPhGtwGBt0qJpFwNXVQAUc9spyN/MaN3zLXyZ mdCNY0QLMSi3iGmgh4rrhdMg3wgeSpDTrpuH8oYNpuW/a205P/tgEZMz1EfvOO2SBUl8 mmj72Kb/aYp1fc6zsvBJRT8ntt0FZrS/9aXkiXtcqZW6ad3t57UUGKwrejcA/WhF1pBN vJXsE4vwtULIHsfQ/ZmszgTQKmDpw5ZzsRvuL16zUJP5risWhUbwT3AYVn7s661d0L46 5pldjoTKw3v9yRyHuAaq7xcyfbT6fMuqVszfPsXwlTrs2zgzLmy8zN/j080qqJa+TEX7 yiYA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698232002; x=1698836802; h=content-transfer-encoding:mime-version: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=vaY3nfvfmbzYDJbqOWLH5VazHNV+dHpgd5Bxd72/usE=; b=QehCCNkRAXMu2QjCWjq6C7F2PXBYkau8fF4IwXp0eO9Jb3T5wNe0F+TWiMTXS47SYc mLNuuTrArbuTExg130g2wFHCtXMYFwRFw/8JuMcat95xD4J3+rHWXMV/32HCrvOB/ZyO mq/l9P5exEoEeWd8ph8pdpvLDdQdwM1oEBgwPf1Iw9lGDeArmFCcOUkTUcaD3XrHDJAh ftX5k08zguGcATEF4MqTxHUBTt+Nz37DNjAMAXpN3QfQPcNPGypinQzaq2I851vzReYL gM8Qhj6t3qmy99E+FmC5IHxSsImZm1ZOCjOB8GOBf9ipeJn2pGilOnWncIJcgryWPxdD mnEA== X-Gm-Message-State: AOJu0Yy3g4eBkHbf4GU3LoTYukOD8iuCbLe3pFOwW245R9o/f/Ljwky1 pdsn829mxJmdOVgiU6zLUm1xKopN++oAirnLBK41 X-Google-Smtp-Source: AGHT+IFTavWsraUdz8XxmD2hqbPK2EY14TcvLT3wtILhCZhhcuZIfuvlP1253fDgpZxlvNUkT7XjJA== X-Received: by 2002:a05:600c:468c:b0:408:3ea0:3026 with SMTP id p12-20020a05600c468c00b004083ea03026mr11185364wmo.11.1698232001915; Wed, 25 Oct 2023 04:06:41 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id bi9-20020a05600c3d8900b003fc16ee2864sm14263608wmb.48.2023.10.25.04.06.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 04:06:41 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Pierre-Emmanuel Patry Subject: [PATCH v2 2/4] libgrust: Add libproc_macro and build system Date: Wed, 25 Oct 2023 13:06:46 +0200 Message-ID: <20231025110658.1232737-3-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231025110658.1232737-1-arthur.cohen@embecosm.com> References: <20231025110658.1232737-1-arthur.cohen@embecosm.com> MIME-Version: 1.0 X-Spam-Status: No, score=-14.2 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=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Pierre-Emmanuel Patry Add some dummy files in libproc_macro along with its build system. libgrust/Changelog: * Makefile.am: New file. * configure.ac: New file. * libproc_macro/Makefile.am: New file. * libproc_macro/proc_macro.cc: New file. * libproc_macro/proc_macro.h: New file. Signed-off-by: Pierre-Emmanuel Patry --- libgrust/Makefile.am | 68 ++++++++++++++++ libgrust/configure.ac | 113 +++++++++++++++++++++++++++ libgrust/libproc_macro/Makefile.am | 58 ++++++++++++++ libgrust/libproc_macro/proc_macro.cc | 7 ++ libgrust/libproc_macro/proc_macro.h | 7 ++ 5 files changed, 253 insertions(+) create mode 100644 libgrust/Makefile.am create mode 100644 libgrust/configure.ac create mode 100644 libgrust/libproc_macro/Makefile.am create mode 100644 libgrust/libproc_macro/proc_macro.cc create mode 100644 libgrust/libproc_macro/proc_macro.h diff --git a/libgrust/Makefile.am b/libgrust/Makefile.am new file mode 100644 index 00000000000..8e5274922c5 --- /dev/null +++ b/libgrust/Makefile.am @@ -0,0 +1,68 @@ +AUTOMAKE_OPTIONS = 1.8 foreign + +SUFFIXES = .c .rs .def .o .lo .a + +ACLOCAL_AMFLAGS = -I . -I .. -I ../config + +AM_CFLAGS = -I $(srcdir)/../libgcc -I $(MULTIBUILDTOP)../../gcc/include + +TOP_GCCDIR := $(shell cd $(top_srcdir) && cd .. && pwd) + +GCC_DIR = $(TOP_GCCDIR)/gcc +RUST_SRC = $(GCC_DIR)/rust + +toolexeclibdir=@toolexeclibdir@ +toolexecdir=@toolexecdir@ + +SUBDIRS = libproc_macro + +RUST_BUILDDIR := $(shell pwd) + +# Work around what appears to be a GNU make bug handling MAKEFLAGS +# values defined in terms of make variables, as is the case for CC and +# friends when we are called from the top level Makefile. +AM_MAKEFLAGS = \ + "GCC_DIR=$(GCC_DIR)" \ + "RUST_SRC=$(RUST_SRC)" \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "RUST_FOR_TARGET=$(RUST_FOR_TARGET)" \ + "CFLAGS=$(CFLAGS)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ + "LDFLAGS=$(LDFLAGS)" \ + "LIBCFLAGS=$(LIBCFLAGS)" \ + "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ + "MAKE=$(MAKE)" \ + "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ + "PICFLAG=$(PICFLAG)" \ + "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ + "SHELL=$(SHELL)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ + "exec_prefix=$(exec_prefix)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "includedir=$(includedir)" \ + "prefix=$(prefix)" \ + "tooldir=$(tooldir)" \ + "gxx_include_dir=$(gxx_include_dir)" \ + "AR=$(AR)" \ + "AS=$(AS)" \ + "LD=$(LD)" \ + "RANLIB=$(RANLIB)" \ + "NM=$(NM)" \ + "NM_FOR_BUILD=$(NM_FOR_BUILD)" \ + "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ + "DESTDIR=$(DESTDIR)" \ + "WERROR=$(WERROR)" \ + "TARGET_LIB_PATH=$(TARGET_LIB_PATH)" \ + "TARGET_LIB_PATH_librust=$(TARGET_LIB_PATH_librust)" \ + "LIBTOOL=$(RUST_BUILDDIR)/libtool" + +include $(top_srcdir)/../multilib.am diff --git a/libgrust/configure.ac b/libgrust/configure.ac new file mode 100644 index 00000000000..7aed489a643 --- /dev/null +++ b/libgrust/configure.ac @@ -0,0 +1,113 @@ +AC_INIT([libgrust], version-unused,,librust) +AC_CONFIG_SRCDIR(Makefile.am) +AC_CONFIG_FILES([Makefile]) + +# AM_ENABLE_MULTILIB(, ..) + +# Do not delete or change the following two lines. For why, see +# http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html +AC_CANONICAL_SYSTEM +target_alias=${target_alias-$host_alias} +AC_SUBST(target_alias) + +# Automake should never attempt to rebuild configure +AM_MAINTAINER_MODE + +AM_INIT_AUTOMAKE([1.15.1 foreign no-dist -Wall]) + +# Make sure we don't test executables when making cross-tools. +GCC_NO_EXECUTABLES + + +# Add the ability to change LIBTOOL directory +GCC_WITH_TOOLEXECLIBDIR + +# Use system specific extensions +AC_USE_SYSTEM_EXTENSIONS + + +# Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(limits.h stddef.h string.h strings.h stdlib.h \ + time.h sys/stat.h wchar.h) + +# Check for tools +AM_PROG_AR +AC_PROG_CC +AC_PROG_CXX +AM_PROG_AS +AC_PROG_MAKE_SET +AC_PROG_INSTALL + +# Enable libtool +LT_INIT + +# target_noncanonical variables... +AC_CANONICAL_HOST +ACX_NONCANONICAL_HOST +ACX_NONCANONICAL_TARGET +GCC_TOPLEV_SUBDIRS + +AC_MSG_CHECKING([for --enable-version-specific-runtime-libs]) +AC_ARG_ENABLE(version-specific-runtime-libs, +[ --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory ], +[case "$enableval" in + yes) version_specific_libs=yes ;; + no) version_specific_libs=no ;; + *) AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);; + esac], +[version_specific_libs=no]) +AC_MSG_RESULT($version_specific_libs) + +toolexecdir=no +toolexeclibdir=no + +# Calculate toolexeclibdir +# Also toolexecdir, though it's only used in toolexeclibdir +case ${version_specific_libs} in + yes) + # Need the gcc compiler version to know where to install libraries + # and header files if --enable-version-specific-runtime-libs option + # is selected. + toolexecdir='$(libdir)/gcc/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' + ;; + no) + if test -n "$with_cross_host" && + test x"$with_cross_host" != x"no"; then + # Install a library built with a cross compiler in tooldir, not libdir. + toolexecdir='$(exec_prefix)/$(target_noncanonical)' + toolexeclibdir='$(toolexecdir)/lib' + else + toolexecdir='$(libdir)/gcc-lib/$(target_noncanonical)' + toolexeclibdir='$(libdir)' + fi + multi_os_directory=`$CC -print-multi-os-directory` + case $multi_os_directory in + .) ;; # Avoid trailing /. + *) toolexeclibdir=$toolexeclibdir/$multi_os_directory ;; + esac + ;; +esac + +AC_SUBST(toolexecdir) +AC_SUBST(toolexeclibdir) + + +AC_CONFIG_FILES(AC_FOREACH([DIR], [libproc_macro], [DIR/Makefile ]), + [ cat > vpsed$$ << \_EOF +s!`test -f '$<' || echo '$(srcdir)/'`!! +_EOF + sed -f vpsed$$ $ac_file > tmp$$ + mv tmp$$ $ac_file + rm vpsed$$ + echo 'MULTISUBDIR =' >> $ac_file + ml_norecursion=yes + AS_UNSET([ml_norecursion]) +]) + + +AC_MSG_NOTICE([librust has been configured.]) + +AC_OUTPUT diff --git a/libgrust/libproc_macro/Makefile.am b/libgrust/libproc_macro/Makefile.am new file mode 100644 index 00000000000..1e61d12e506 --- /dev/null +++ b/libgrust/libproc_macro/Makefile.am @@ -0,0 +1,58 @@ +SUFFIXES = .cc .o .a .lo .la + +ACLOCAL_AMFLAGS = -I .. -I ../../config + +toolexeclibdir=@toolexeclibdir@ +toolexecdir=@toolexecdir@ + +# Work around what appears to be a GNU make bug handling MAKEFLAGS +# values defined in terms of make variables, as is the case for CC and +# friends when we are called from the top level Makefile. +AM_MAKEFLAGS = \ + "AR_FLAGS=$(AR_FLAGS)" \ + "CC_FOR_BUILD=$(CC_FOR_BUILD)" \ + "CC_FOR_TARGET=$(CC_FOR_TARGET)" \ + "CFLAGS=$(CFLAGS)" \ + "CXXFLAGS=$(CXXFLAGS)" \ + "CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \ + "CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \ + "INSTALL=$(INSTALL)" \ + "INSTALL_DATA=$(INSTALL_DATA)" \ + "INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \ + "INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \ + "LDFLAGS=$(LDFLAGS)" \ + "LIBCFLAGS=$(LIBCFLAGS)" \ + "LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \ + "MAKE=$(MAKE)" \ + "MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \ + "PICFLAG=$(PICFLAG)" \ + "PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \ + "SHELL=$(SHELL)" \ + "RUNTESTFLAGS=$(RUNTESTFLAGS)" \ + "exec_prefix=$(exec_prefix)" \ + "infodir=$(infodir)" \ + "libdir=$(libdir)" \ + "includedir=$(includedir)" \ + "prefix=$(prefix)" \ + "tooldir=$(tooldir)" \ + "gxx_include_dir=$(gxx_include_dir)" \ + "AR=$(AR)" \ + "AS=$(AS)" \ + "LD=$(LD)" \ + "RANLIB=$(RANLIB)" \ + "NM=$(NM)" \ + "NM_FOR_BUILD=$(NM_FOR_BUILD)" \ + "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ + "DESTDIR=$(DESTDIR)" \ + "WERROR=$(WERROR)" \ + "TARGET_LIB_PATH=$(TARGET_LIB_PATH)" \ + "TARGET_LIB_PATH_libgm2=$(TARGET_LIB_PATH_libgm2)" + +toolexeclib_LTLIBRARIES = libproc_macro.la + +libproc_macro_la_SOURCES = \ + proc_macro.cc + +include_HEADERS = \ + proc_macro.h + diff --git a/libgrust/libproc_macro/proc_macro.cc b/libgrust/libproc_macro/proc_macro.cc new file mode 100644 index 00000000000..d13276294aa --- /dev/null +++ b/libgrust/libproc_macro/proc_macro.cc @@ -0,0 +1,7 @@ +#include "proc_macro.h" + +int +test () +{ + return 0; +} diff --git a/libgrust/libproc_macro/proc_macro.h b/libgrust/libproc_macro/proc_macro.h new file mode 100644 index 00000000000..2c96b3de685 --- /dev/null +++ b/libgrust/libproc_macro/proc_macro.h @@ -0,0 +1,7 @@ +#ifndef PROC_MACRO_H +#define PROC_MACRO_H + +int +test (); + +#endif /* ! PROC_MACRO_H */ From patchwork Wed Oct 25 11:06:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1855006 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.a=rsa-sha256 header.s=google header.b=O0lxi3NV; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=8.43.85.97; helo=server2.sourceware.org; envelope-from=gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=patchwork.ozlabs.org) Received: from server2.sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SFmND30qXz23jV for ; Wed, 25 Oct 2023 22:07:08 +1100 (AEDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 0214B3853531 for ; Wed, 25 Oct 2023 11:07:03 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-lf1-x131.google.com (mail-lf1-x131.google.com [IPv6:2a00:1450:4864:20::131]) by sourceware.org (Postfix) with ESMTPS id 01DA6385DC14 for ; Wed, 25 Oct 2023 11:06:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 01DA6385DC14 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 01DA6385DC14 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2a00:1450:4864:20::131 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698232011; cv=none; b=flbLoF/i5Wb8m98FZm/A7AZLvoU3PKnYRORO/Z3FZc/ejkYgvW+2Xhhfdn7Kerrvf3eGjAIFHlvOtZ+dfLnBVkC6nBWpPCiFO05Z8YQLExhye4tviQfrEhvswG7qoZQk3ueMCewbTgV9nf9j37RegZ6OAenJxqrXQJp+Fp/DGT8= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698232011; c=relaxed/simple; bh=fb9HJlmCFF3hRtiRRBL8AhosoDKzxivbHv00LJaa8ag=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=RCgQfTUFBrxsJ/yPnNFu/UXcibr2d3cT0zkOhiSmkFcI8vHACySbGBilmvCXX6vGMBfcugq0yNxsrh4HohaZRU3jLWa5TfA+yiGnCsWK71U3tqEmgxwh2zBFizS4I81MJ0ni2ClAGYHqZdC67QRSGR0I5M2HDhmaKh1loPcF78E= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-lf1-x131.google.com with SMTP id 2adb3069b0e04-508126afc88so1592260e87.1 for ; Wed, 25 Oct 2023 04:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1698232008; x=1698836808; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4ICg4GLyKpf1C86CGQFuYeq/Nx18X/8YI6tog+9D9S4=; b=O0lxi3NVitTu0R5KIxRWAzVLE8Zo9DO5kQ9Qfi+h27UubhAkP93kXbDJ43V1q8sIwQ TKeiwx3MlVCgU4WtnmchQva8Y/8qsAQDFX/KoM33yAq8xNzqQnTQgYI+KWNPCZLoyi0J i9xrSB0rsjYjWWBHr0k3c09l/QKnPO+b4SGy5aApsOEleVS+7JFKqMPbp7S39Hjz63+E 4Gkem3/08jDEDv6QLqstXdrOoa+bUU67ZABQNq5v8o/go5HZDH0tNkt1jwv6yFBrVKNu 3gZ3O/0ZS6Z+lnGRLt6rvlX+LhdGBeZcmTG5L6eCuP/Js1v18LOq/wb2ZtGIwZMsbF3J N1hw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698232008; x=1698836808; h=content-transfer-encoding:mime-version: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=4ICg4GLyKpf1C86CGQFuYeq/Nx18X/8YI6tog+9D9S4=; b=AukesQE3M4v7eX7pKaC9+hpY57zAUZPvQKoPJ4iSDK6qzLicANrApUKKpFpcIfnpAh dJUJ8ue6GHbTZXb6PcknK8lD0ncc7oKu/sTJv3V9y2qRjdaVxFwAO7GkfA5jkoqaFM/6 osDPpJJs9lz9GWzzSacvFgLr8zp3EffjQ/rXBV49rTD9Iy0fG/+Y9OPPdCPluj8A3rXh /lSDNVATv1QIekWXpZOCKuAmIFFoQEogDEWR0tEahOvFK1rhW+Df2FbN7z2EjRMJc0Qo Xe8OEnKoVyaKCshTy3/4gGeFmqyRU5PWTpHMKIucbUsacuydWL6R/hdjaZqgdkOPWvwz VRPg== X-Gm-Message-State: AOJu0Yx+yJUAWR4TswjL486zdwcnDmC+YZMFIqCBVA/UAlWSPpPeYKM1 8ymeu6NYXjx6toP/QRYpXPokqpB6PmTWPTJqqxbN X-Google-Smtp-Source: AGHT+IGzfc7ErG7KTg3d2IGhrhvVWLP0MlsOIE6Oy14WnMwZqWqUnp13Gj+WouPOD5pGK0swAaWCkQ== X-Received: by 2002:a19:7516:0:b0:4ff:7004:545e with SMTP id y22-20020a197516000000b004ff7004545emr10342847lfe.4.1698232007830; Wed, 25 Oct 2023 04:06:47 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id bi9-20020a05600c3d8900b003fc16ee2864sm14263608wmb.48.2023.10.25.04.06.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Oct 2023 04:06:47 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Pierre-Emmanuel Patry Subject: [PATCH v2 3/4] build: Add libgrust as compilation modules Date: Wed, 25 Oct 2023 13:06:48 +0200 Message-ID: <20231025110658.1232737-5-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231025110658.1232737-1-arthur.cohen@embecosm.com> References: <20231025110658.1232737-1-arthur.cohen@embecosm.com> MIME-Version: 1.0 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, 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 X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gcc-patches-bounces+incoming=patchwork.ozlabs.org@gcc.gnu.org From: Pierre-Emmanuel Patry Define the libgrust directory as a host compilation module as well as for targets. ChangeLog: * Makefile.def: Add libgrust as host & target module. * configure.ac: Add libgrust to host tools list. gcc/rust/ChangeLog: * config-lang.in: Add libgrust as a target module for the rust language. Signed-off-by: Pierre-Emmanuel Patry Signed-off-by: Pierre-Emmanuel Patry --- Makefile.def | 2 ++ configure.ac | 3 ++- gcc/rust/config-lang.in | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Makefile.def b/Makefile.def index 15c068e4ac4..929a6f0a08e 100644 --- a/Makefile.def +++ b/Makefile.def @@ -149,6 +149,7 @@ host_modules= { module= libcc1; extra_configure_flags=--enable-shared; }; host_modules= { module= gotools; }; host_modules= { module= libctf; bootstrap=true; }; host_modules= { module= libsframe; bootstrap=true; }; +host_modules= { module= libgrust; }; target_modules = { module= libstdc++-v3; bootstrap=true; @@ -192,6 +193,7 @@ target_modules = { module= libgm2; lib_path=.libs; }; target_modules = { module= libgomp; bootstrap= true; lib_path=.libs; }; target_modules = { module= libitm; lib_path=.libs; }; target_modules = { module= libatomic; bootstrap=true; lib_path=.libs; }; +target_modules = { module= libgrust; }; // These are (some of) the make targets to be done in each subdirectory. // Not all; these are the ones which don't have special options. diff --git a/configure.ac b/configure.ac index 692dc716343..b2a5511bab1 100644 --- a/configure.ac +++ b/configure.ac @@ -133,7 +133,7 @@ build_tools="build-texinfo build-flex build-bison build-m4 build-fixincludes" # these libraries are used by various programs built for the host environment #f -host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libiconv libctf libsframe" +host_libs="intl libiberty opcodes bfd readline tcl tk itcl libgui zlib libbacktrace libcpp libcody libdecnumber gmp mpfr mpc isl libiconv libctf libsframe libgrust " # these tools are built for the host environment # Note, the powerpc-eabi build depends on sim occurring before gdb in order to @@ -164,6 +164,7 @@ target_libraries="target-libgcc \ target-libada \ target-libgm2 \ target-libgo \ + target-libgrust \ target-libphobos \ target-zlib" diff --git a/gcc/rust/config-lang.in b/gcc/rust/config-lang.in index aac66c9b962..8f071dcb0bf 100644 --- a/gcc/rust/config-lang.in +++ b/gcc/rust/config-lang.in @@ -29,4 +29,6 @@ compilers="rust1\$(exeext)" build_by_default="no" +target_libs="target-libffi target-libbacktrace target-libgrust" + gtfiles="\$(srcdir)/rust/rust-lang.cc"