From patchwork Wed Sep 20 11:59:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1837217 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=Fqqo7sx6; 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 4RrHHG1Vtmz1yhR for ; Wed, 20 Sep 2023 22:03:22 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 006F6385770D for ; Wed, 20 Sep 2023 12:03:20 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id 364543858407 for ; Wed, 20 Sep 2023 12:02:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 364543858407 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-wm1-x332.google.com with SMTP id 5b1f17b1804b1-405082a8c77so35776475e9.0 for ; Wed, 20 Sep 2023 05:02:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1695211377; x=1695816177; 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=0IrGLzGi1C3xCFPvhguXJdXBknbPu+QMPO2VRXRcWOw=; b=Fqqo7sx6IiBTsrrz/WZV00IIsDurwMdXMy8/B/SnD1BnEjp20f/iUQGvXUvtXTToLB ufz93oZN4pn7XgpgkG+j4DBcoaPY8Ah3FX0Z2CukSD9/VSmKY29Y3GNtdZ9H4k0ERC4y DEduV3O/SfkBgp5W1WbJMuOMqxlIbx8wnYAzU7cDUmhSiMfhhMTAalsuvr3KE0rwSu/D MHW+tIJ7gu6Lh8RVW2nj/TpyRc5+YirKQ2nKp6SjxxTL7fte5wk5f+x5I7SAR2VjbVfZ mGGbRrtI3vv+l8YrfMhnlLXxwTNmfYd09+EE/JXk5DhTvrjfge8iYf64kjFIW8vA2Xsz 2r+Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695211377; x=1695816177; 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=0IrGLzGi1C3xCFPvhguXJdXBknbPu+QMPO2VRXRcWOw=; b=Fir0i90JZyZK/MC2Yv4skCg66nxwTfvkTZV2IdEVXdamPiwOsN98nvkG6fFyKj2ODt /aEAIruoLKIl19JfWsjb0NslZjz5lFrEQO6MTNFeeT0ncuJHMFfo9NlposRUzPlS35xz ogcjeWNaqUPFgwxiPWk3jN0fa9nbgcHabQbhjDKx87AnLjniiYRnl94Sabd9IP6DG7o8 v9CFdgl5tQ/mIOQ5juMQ3cv5YwNECca/1Yj5DznKRJtR7ssmDymEwudsHT7PmNR/exLe E+vvnRovs61c7cdCykj0JfNlUgnX0yJ2hVPNpM6aJ4H0A01vMfgW3vp3xHzJEGd6Ollx 6POg== X-Gm-Message-State: AOJu0YwaKRx6YLjs3P11Jx5k64/f+aR5u5OozVJc/Rhk8Af4yFcqrgEz AmMQf4f7PPydYqYN1+v6It5ukMwRphIrxW1HhHTa X-Google-Smtp-Source: AGHT+IEWpbf05fHAYU/fieku276MtP8ETHVFhUlWRGoQMgYvhlzD+YPoN3RmAslkG5EiRBEKXS1CNg== X-Received: by 2002:a7b:cd9a:0:b0:3fe:5053:1a0b with SMTP id y26-20020a7bcd9a000000b003fe50531a0bmr2100916wmj.11.1695211376241; Wed, 20 Sep 2023 05:02:56 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id c6-20020a7bc846000000b003fe29dc0ff2sm1782020wml.21.2023.09.20.05.02.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 05:02:55 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Pierre-Emmanuel Patry Subject: [PATCH 1/3] librust: Add libproc_macro and build system Date: Wed, 20 Sep 2023 13:59:51 +0200 Message-ID: <20230920120311.14892-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, 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 This patch series adds the build system changes to allow the Rust frontend to develop and distribute its own libraries. The first library we have been working on is the `proc_macro` library, comprised of a C++ library as well as a user-facing Rust library. Follow up commits containing the actual library code will be committed. Should I submit patches to the MAINTAINERS file to allow Philip and I to commit to this folder without first approval? This first commit adds a simple `libgrust` folder with on top of which the full library will be built. All the best, Arthur ----- Add some dummy files in libproc_macro along with it's build system. ChangeLog: * libgrust/Makefile.am: New file. * libgrust/configure.ac: New file. * libgrust/libproc_macro/Makefile.am: New file. * libgrust/libproc_macro/proc_macro.cc: New file. * libgrust/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 Sep 20 11:59:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arthur Cohen X-Patchwork-Id: 1837218 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=Ro3f8DVh; 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 (ip-8-43-85-97.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 4RrHHJ021Qz1yhR for ; Wed, 20 Sep 2023 22:03:23 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CE65F385C6FC for ; Wed, 20 Sep 2023 12:03:21 +0000 (GMT) X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-wm1-x332.google.com (mail-wm1-x332.google.com [IPv6:2a00:1450:4864:20::332]) by sourceware.org (Postfix) with ESMTPS id B38DF3858410 for ; Wed, 20 Sep 2023 12:03:08 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B38DF3858410 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-wm1-x332.google.com with SMTP id 5b1f17b1804b1-401b393ddd2so75314635e9.0 for ; Wed, 20 Sep 2023 05:03:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; t=1695211387; x=1695816187; 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=eP5PyHzsyHSKt1v9BCO2buhNn/+ksBjKp6ZZ3PKBdhE=; b=Ro3f8DVhgRhPA5zMN5AmQ9u1M+4DV9TgmuPyTwv6cAATz76lpD38oepjF2Tdt8UbBP ApJr2KhiRpGbZ9s66Gk4drEx5UNioipp0BbY23/r9Pof5J+/u9wV9Cxj41W7HuqeVHRJ 9uMXD9Lxlo2KJzQ02PB+CEsSCKMA5agB5NG7H1XXkus6yxuZRqm+kYUJyu4I0ULeo0a6 kN74SjIfKCPCjej+c0wpEOuucTghsLTQVpNDU1/8s2oZzY71eSPR55rMj4Wp11e2JCsT xMLJohAEyr+0kS4+Hh/PbPqUvOjvut1OHETAmkIphtXelAg2aemqJamFI4k8nxEb8LKu vjsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695211387; x=1695816187; 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=eP5PyHzsyHSKt1v9BCO2buhNn/+ksBjKp6ZZ3PKBdhE=; b=gFWYHBClCK9AqL8dm7Jf5ppR0idj9UCRwu4DWBIhD6wJScElW/3FqlS0OjuU/bZ0fA D/vaohcVth7LoF3k8IWPgzA9JquuVKv7VAebqtQQKZ1ZxXrOJ9SgjnoiUQj4HnuPLYkW 5nj2/czFVV0W7iesSqXiXiTcX/vyZaunfKFafg4NYGA1J7BTgXkUZdhv6V91R3N3RQpB tcVMZtzcc+VW8U9L+tAgUAoASgvcsHi0yNItUBdzkzD3m7opNGVl1akZdd0opAHFYtAS Rk0391Jgqm5kB+HCpPDclo9gUABZNW5uzsjl3ydU0bSPyETnCd4OXe0HC4FDmKh8VKIp EF5g== X-Gm-Message-State: AOJu0Yw6lqlRHLsQ2M80Gt9WN7im2OMShIpQz5HruudcnMwbf06OEmWS xwz4HUXmv+ZutxMq+pOVtFdk7GZ5IIhaY9nG+2iz X-Google-Smtp-Source: AGHT+IHw3BED0Qn8ssdJpQV454Qdu7QO6jvBI0lR6KRKfeDmhfyHTJGVKLZje4mZh8XaNFgF2tcwFw== X-Received: by 2002:a05:600c:241:b0:401:c52c:5ed9 with SMTP id 1-20020a05600c024100b00401c52c5ed9mr2139820wmj.32.1695211386126; Wed, 20 Sep 2023 05:03:06 -0700 (PDT) Received: from platypus.localdomain ([62.23.166.218]) by smtp.gmail.com with ESMTPSA id c6-20020a7bc846000000b003fe29dc0ff2sm1782020wml.21.2023.09.20.05.03.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Sep 2023 05:03:05 -0700 (PDT) From: Arthur Cohen To: gcc-patches@gcc.gnu.org Cc: gcc-rust@gcc.gnu.org, Pierre-Emmanuel Patry Subject: [PATCH 2/3] build: Add libgrust as compilation modules Date: Wed, 20 Sep 2023 13:59:53 +0200 Message-ID: <20230920120311.14892-3-arthur.cohen@embecosm.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20230920120311.14892-1-arthur.cohen@embecosm.com> References: <20230920120311.14892-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 --- 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 870150183b9..3df3fc18d14 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 1d16530140a..036e5945905 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"