public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: Iain Sandoe <iain@sandoe.co.uk>
To: Thomas Schwinge <thomas@codesourcery.com>
Cc: Arthur Cohen <arthur.cohen@embecosm.com>,
	Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>,
	gcc-rust@gcc.gnu.org, GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH v2 2/4] libgrust: Add libproc_macro and build system
Date: Fri, 27 Oct 2023 08:51:12 +0100	[thread overview]
Message-ID: <0B027199-B2BD-4CC0-9654-695A0316783A@sandoe.co.uk> (raw)
In-Reply-To: <87edhhu741.fsf@euler.schwinge.homeip.net>

[-- Attachment #1: Type: text/plain, Size: 1234 bytes --]



> On 26 Oct 2023, at 09:21, Thomas Schwinge <thomas@codesourcery.com> wrote:
> 
> Hi!
> 
> First, I've pushed into GCC upstream Git branch devel/rust/libgrust-v2
> the "v2" libgrust changes as posted by Arthur, so that people can easily
> test this before it getting into Git master branch.
> 
> I'll myself later try this for GCN and nvptx targets -- in their current
> form where they don't support C++ (standard library), and in my hacky WIP
> trees where C++ (standard library) is supported to some extent.  (This
> should, roughly, match C++ functionality (not) provided by a number of
> other GCC "embedded" targets.)

on Darwin, it works for later systems without multilibs, but fails to build multilibs.

—— so….

With the patch below bootstrap suceeded on x86_64-darwin17 and produced a correct
architecture multilib.  Of course, there is no way to test this at the moment - I’d suggest
that the next step might be something small in functionality that can allow at least one
test to be wired up.

^^^ this is “lightly tested” of course, as I cycle through other versions of the OS will see
how it pans out.

Do you want me to make a PR with this change against upstream?

Iain


[-- Attachment #2: 0001-libgrust-enable-multilib.patch --]
[-- Type: application/octet-stream, Size: 7679 bytes --]

From 027bc2c5255a6f1b75592e896dd99fac55bfb9b8 Mon Sep 17 00:00:00 2001
From: Iain Sandoe <iain@sandoe.co.uk>
Date: Thu, 26 Oct 2023 23:19:36 +0100
Subject: [PATCH] libgrust: enable multilib

Most of this change is the regenerated files, the multilib config macro
was already present, but commented out.

libgrust/ChangeLog:

	* Makefile.in:
	* aclocal.m4: Regenerate.
	* configure: Regenerate.
	* configure.ac: Uncomment AM_ENABLE_MULTILIB.
	* libproc_macro/Makefile.in:

Signed-off-by: Iain Sandoe <iain@sandoe.co.uk>
---
 libgrust/Makefile.in               |  2 +
 libgrust/aclocal.m4                |  1 +
 libgrust/configure                 | 68 ++++++++++++++++++++++++++++--
 libgrust/configure.ac              |  2 +-
 libgrust/libproc_macro/Makefile.in |  2 +
 5 files changed, 71 insertions(+), 4 deletions(-)

diff --git a/libgrust/Makefile.in b/libgrust/Makefile.in
index bc9b6cc227a..2dc39adff24 100644
--- a/libgrust/Makefile.in
+++ b/libgrust/Makefile.in
@@ -93,6 +93,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
+	$(top_srcdir)/../config/multi.m4 \
 	$(top_srcdir)/../config/no-executables.m4 \
 	$(top_srcdir)/../config/override.m4 \
 	$(top_srcdir)/../config/toolexeclibdir.m4 \
@@ -275,6 +276,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
+multi_basedir = @multi_basedir@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 prefix = @prefix@
diff --git a/libgrust/aclocal.m4 b/libgrust/aclocal.m4
index 1bd42c34d74..5d808f05afa 100644
--- a/libgrust/aclocal.m4
+++ b/libgrust/aclocal.m4
@@ -1250,6 +1250,7 @@ AC_SUBST([am__untar])
 m4_include([../config/acx.m4])
 m4_include([../config/depstand.m4])
 m4_include([../config/lead-dot.m4])
+m4_include([../config/multi.m4])
 m4_include([../config/no-executables.m4])
 m4_include([../config/override.m4])
 m4_include([../config/toolexeclibdir.m4])
diff --git a/libgrust/configure b/libgrust/configure
index 2756bddd10b..282027873bd 100755
--- a/libgrust/configure
+++ b/libgrust/configure
@@ -732,6 +732,7 @@ build_os
 build_vendor
 build_cpu
 build
+multi_basedir
 target_alias
 host_alias
 build_alias
@@ -773,6 +774,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_multilib
 enable_maintainer_mode
 enable_silent_rules
 with_toolexeclibdir
@@ -1421,6 +1423,7 @@ Optional Features:
   --disable-option-checking  ignore unrecognized --enable/--with options
   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-multilib       build many library versions (default)
   --enable-maintainer-mode
                           enable make rules and dependencies not useful (and
                           sometimes confusing) to the casual installer
@@ -2376,7 +2379,43 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 ac_config_files="$ac_config_files Makefile"
 
 
-# AM_ENABLE_MULTILIB(, ..)
+# Default to --enable-multilib
+# Check whether --enable-multilib was given.
+if test "${enable_multilib+set}" = set; then :
+  enableval=$enable_multilib; case "$enableval" in
+  yes) multilib=yes ;;
+  no)  multilib=no ;;
+  *)   as_fn_error $? "bad value $enableval for multilib option" "$LINENO" 5 ;;
+ esac
+else
+  multilib=yes
+fi
+
+
+# We may get other options which we leave undocumented:
+# --with-target-subdir, --with-multisrctop, --with-multisubdir
+# See config-ml.in if you want the gory details.
+
+if test "$srcdir" = "."; then
+  if test "$with_target_subdir" != "."; then
+    multi_basedir="$srcdir/$with_multisrctop../.."
+  else
+    multi_basedir="$srcdir/$with_multisrctop.."
+  fi
+else
+  multi_basedir="$srcdir/.."
+fi
+
+
+# Even if the default multilib is not a cross compilation,
+# it may be that some of the other multilibs are.
+if test $cross_compiling = no && test $multilib = yes \
+   && test "x${with_multisubdir}" != x ; then
+   cross_compiling=maybe
+fi
+
+ac_config_commands="$ac_config_commands default-1"
+
 
 # Do not delete or change the following two lines.  For why, see
 # http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html
@@ -12512,7 +12551,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12515 "configure"
+#line 12554 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -12618,7 +12657,7 @@ else
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
   lt_status=$lt_dlunknown
   cat > conftest.$ac_ext <<_LT_EOF
-#line 12621 "configure"
+#line 12660 "configure"
 #include "confdefs.h"
 
 #if HAVE_DLFCN_H
@@ -16804,6 +16843,20 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 #
 # INIT-COMMANDS
 #
+
+srcdir="$srcdir"
+host="$host"
+target="$target"
+with_multisubdir="$with_multisubdir"
+with_multisrctop="$with_multisrctop"
+with_target_subdir="$with_target_subdir"
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+multi_basedir="$multi_basedir"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+CC="$CC"
+CXX="$CXX"
+GFORTRAN="$GFORTRAN"
+GDC="$GDC"
 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
 
 
@@ -17175,6 +17228,7 @@ for ac_config_target in $ac_config_targets
 do
   case $ac_config_target in
     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
     "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
     "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
     "libproc_macro/Makefile") CONFIG_FILES="$CONFIG_FILES libproc_macro/Makefile" ;;
@@ -17607,6 +17661,14 @@ $as_echo "$as_me: executing $ac_file commands" >&6;}
 
 
   case $ac_file$ac_mode in
+    "default-1":C)
+# Only add multilib support code if we just rebuilt the top-level
+# Makefile.
+case " $CONFIG_FILES " in
+ *" Makefile "*)
+   ac_file=Makefile . ${multi_basedir}/config-ml.in
+   ;;
+esac ;;
     "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
   # Older Autoconf quotes --file arguments for eval, but not when files
   # are listed without --file.  Let's play safe and only enable the eval
diff --git a/libgrust/configure.ac b/libgrust/configure.ac
index 7aed489a643..d75aa632462 100644
--- a/libgrust/configure.ac
+++ b/libgrust/configure.ac
@@ -2,7 +2,7 @@ AC_INIT([libgrust], version-unused,,librust)
 AC_CONFIG_SRCDIR(Makefile.am)
 AC_CONFIG_FILES([Makefile])
 
-# AM_ENABLE_MULTILIB(, ..)
+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
diff --git a/libgrust/libproc_macro/Makefile.in b/libgrust/libproc_macro/Makefile.in
index d3a39736679..46eb6484094 100644
--- a/libgrust/libproc_macro/Makefile.in
+++ b/libgrust/libproc_macro/Makefile.in
@@ -95,6 +95,7 @@ ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \
 	$(top_srcdir)/../config/depstand.m4 \
 	$(top_srcdir)/../config/lead-dot.m4 \
+	$(top_srcdir)/../config/multi.m4 \
 	$(top_srcdir)/../config/no-executables.m4 \
 	$(top_srcdir)/../config/override.m4 \
 	$(top_srcdir)/../config/toolexeclibdir.m4 \
@@ -316,6 +317,7 @@ localedir = @localedir@
 localstatedir = @localstatedir@
 mandir = @mandir@
 mkdir_p = @mkdir_p@
+multi_basedir = @multi_basedir@
 oldincludedir = @oldincludedir@
 pdfdir = @pdfdir@
 prefix = @prefix@
-- 
2.39.2 (Apple Git-143)


[-- Attachment #3: Type: text/plain, Size: 12206 bytes --]


> 
> 
> Then:
> 
> On 2023-10-25T13:06:46+0200, Arthur Cohen <arthur.cohen@embecosm.com> wrote:
>> From: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
>> 
>> Add some dummy files in libproc_macro along with its build system.
> 
> I've not reviewed the build system in detail, just had a very quick look.
> 
> Three instances of 'librust'; should be 'libgrust':
> 
>    configure.ac:AC_INIT([libgrust], version-unused,,librust)
> 
>    configure.ac:AC_MSG_NOTICE([librust has been configured.])
> 
>    Makefile.am:        "TARGET_LIB_PATH_librust=$(TARGET_LIB_PATH_librust)" \
> 
> Compared to libgomp (which I'm reasonably familiar with), I found missing
> in 'libgrust' at 'configure'-level:
> 
>      --enable-multilib       build many library versions (default)
> 
>      --disable-werror        disable building with -Werror
> 
>      --enable-symvers=STYLE  enables symbol versioning of the shared library
>                              [default=yes]
> 
>      --enable-cet            enable Intel CET in target libraries [default=auto]
> 
>      --with-gcc-major-version-only
>                              use only GCC major number in filesystem paths
> 
> I can't tell off-hand whether all these are important, however.
> 
> Additionally, the new one that's being discussed in
> <https://github.com/Rust-GCC/gccrs/issues/2714>
> 'Update libgrust for upstream GCC commit 6a6d3817afa02bbcd2388c8e005da6faf88932f1 "Config,Darwin: Allow for configuring Darwin to use embedded runpath"'.
> 
> 
> Grüße
> Thomas
> 
> 
>> 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 <pierre-emmanuel.patry@embecosm.com>
>> ---
>> 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 */
>> --
>> 2.42.0
> -----------------
> Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstraße 201, 80634 München; Gesellschaft mit beschränkter Haftung; Geschäftsführer: Thomas Heurung, Frank Thürauf; Sitz der Gesellschaft: München; Registergericht München, HRB 106955


  reply	other threads:[~2023-10-27  7:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-25 11:06 [PATCH v2 1/4] libgrust: Add entry for maintainers and stub changelog file Arthur Cohen
2023-10-25 11:06 ` [PATCH v2 2/4] libgrust: Add libproc_macro and build system Arthur Cohen
2023-10-26  8:21   ` Thomas Schwinge
2023-10-27  7:51     ` Iain Sandoe [this message]
2023-10-27 14:20       ` Thomas Schwinge
2023-10-27 20:32         ` Disable target libgrust if we're not building target libstdc++ (was: [PATCH v2 2/4] libgrust: Add libproc_macro and build system) Thomas Schwinge
2023-12-18 16:58       ` libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056] " Thomas Schwinge
2024-01-04 15:43         ` libgrust: 'AM_ENABLE_MULTILIB' only for target builds [PR113056] Pierre-Emmanuel Patry
2023-12-15  9:53     ` [PATCH v2 2/4] libgrust: Add libproc_macro and build system Thomas Schwinge
2024-01-16 15:07       ` Jason Merrill
2023-10-25 11:06 ` [PATCH v2 3/4] build: Add libgrust as compilation modules Arthur Cohen
2023-10-25 11:09   ` [PATCH v2 4/4] build: Regenerate build files Arthur Cohen
2023-10-25 21:40   ` [PATCH v2 3/4] build: Add libgrust as compilation modules Thomas Schwinge
2023-10-26 12:07     ` Arthur Cohen
2023-10-27 10:24     ` Only build host libgrust if the Rust language is enabled (was: [PATCH v2 3/4] build: Add libgrust as compilation modules) Thomas Schwinge
2023-10-25 11:06 ` [PATCH v2 4/4] build: Regenerate build files Arthur Cohen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0B027199-B2BD-4CC0-9654-695A0316783A@sandoe.co.uk \
    --to=iain@sandoe.co.uk \
    --cc=arthur.cohen@embecosm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc-rust@gcc.gnu.org \
    --cc=pierre-emmanuel.patry@embecosm.com \
    --cc=thomas@codesourcery.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).