From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp002.apm-internet.net (smtp002.apm-internet.net [85.119.248.221]) by sourceware.org (Postfix) with ESMTPS id 28BA03853513 for ; Fri, 27 Oct 2023 07:51:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 28BA03853513 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=sandoe.co.uk Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=sandoe.co.uk ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 28BA03853513 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=85.119.248.221 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698393077; cv=none; b=vz96sOHHX7/33XqXEPJqu9cMiT0OKalUEtO9JGZriU882zWOtVfngFik/xSfCZinO6k0oduS+iw/thmwii2Iwr0TdiuXX5N1qIsfCQPam3mvS2miYPSwR3A2DgGYHRiyOj8NtYlg92gsuXflPtJPMz6qZzWRVEQP8waEiWOdjz0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1698393077; c=relaxed/simple; bh=lQNynnX1aHJZsdv1JzyWlVXhcykr/O2MENaoShKI9xE=; h=From:Message-Id:Mime-Version:Subject:Date:To; b=cmRM7GUcExFV81G/zy0XZx1LyFOxflCpCngzyFLgST33gQ6b4OymjdiGW8rFUZaj+8bOS6Ou0vLzooc6LO7GPmJFiZfEAQmyg/0aWjAyEe1SPjQHP5JyheXKqeSN90as6Pc6x0v5BXc7H90KNMLBu8zZKvVOGtUOWlJvGjd8E9A= ARC-Authentication-Results: i=1; server2.sourceware.org Received: (qmail 87937 invoked from network); 27 Oct 2023 07:51:12 -0000 X-APM-Out-ID: 16983930728793 X-APM-Authkey: 257869/1(257869/1) 5 Received: from unknown (HELO smtpclient.apple) (81.138.1.83) by smtp002.apm-internet.net with SMTP; 27 Oct 2023 07:51:12 -0000 From: Iain Sandoe Message-Id: <0B027199-B2BD-4CC0-9654-695A0316783A@sandoe.co.uk> Content-Type: multipart/mixed; boundary="Apple-Mail=_E42AE435-C59D-45A9-B0BF-DB5ECCBE6FE7" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.4\)) Subject: Re: [PATCH v2 2/4] libgrust: Add libproc_macro and build system Date: Fri, 27 Oct 2023 08:51:12 +0100 In-Reply-To: <87edhhu741.fsf@euler.schwinge.homeip.net> Cc: Arthur Cohen , Pierre-Emmanuel Patry , gcc-rust@gcc.gnu.org, GCC Patches To: Thomas Schwinge References: <20231025110658.1232737-1-arthur.cohen@embecosm.com> <20231025110658.1232737-3-arthur.cohen@embecosm.com> <87edhhu741.fsf@euler.schwinge.homeip.net> X-Mailer: Apple Mail (2.3696.120.41.1.4) X-Spam-Status: No, score=-9.2 required=5.0 tests=BAYES_00,GIT_PATCH_0,KAM_COUK,KAM_DMARC_STATUS,KAM_SHORT,RCVD_IN_DNSWL_LOW,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: --Apple-Mail=_E42AE435-C59D-45A9-B0BF-DB5ECCBE6FE7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 26 Oct 2023, at 09:21, Thomas Schwinge = wrote: >=20 > Hi! >=20 > 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. >=20 > 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. =E2=80=94=E2=80=94 so=E2=80=A6. 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=E2=80=99d suggest that the next step might be something small in functionality that can = allow at least one test to be wired up. ^^^ this is =E2=80=9Clightly tested=E2=80=9D 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 --Apple-Mail=_E42AE435-C59D-45A9-B0BF-DB5ECCBE6FE7 Content-Disposition: attachment; filename=0001-libgrust-enable-multilib.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-libgrust-enable-multilib.patch" Content-Transfer-Encoding: quoted-printable =46rom=20027bc2c5255a6f1b75592e896dd99fac55bfb9b8=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Iain=20Sandoe=20=0ADate:=20= Thu,=2026=20Oct=202023=2023:19:36=20+0100=0ASubject:=20[PATCH]=20= libgrust:=20enable=20multilib=0A=0AMost=20of=20this=20change=20is=20the=20= regenerated=20files,=20the=20multilib=20config=20macro=0Awas=20already=20= present,=20but=20commented=20out.=0A=0Alibgrust/ChangeLog:=0A=0A=09*=20= Makefile.in:=0A=09*=20aclocal.m4:=20Regenerate.=0A=09*=20configure:=20= Regenerate.=0A=09*=20configure.ac:=20Uncomment=20AM_ENABLE_MULTILIB.=0A=09= *=20libproc_macro/Makefile.in:=0A=0ASigned-off-by:=20Iain=20Sandoe=20= =0A---=0A=20libgrust/Makefile.in=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20|=20=202=20+=0A=20libgrust/aclocal.m4=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20|=20=201=20+=0A=20libgrust/configure=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20|=2068=20= ++++++++++++++++++++++++++++--=0A=20libgrust/configure.ac=20=20=20=20=20=20= =20=20=20=20=20=20=20=20|=20=202=20+-=0A=20= libgrust/libproc_macro/Makefile.in=20|=20=202=20+=0A=205=20files=20= changed,=2071=20insertions(+),=204=20deletions(-)=0A=0Adiff=20--git=20= a/libgrust/Makefile.in=20b/libgrust/Makefile.in=0Aindex=20= bc9b6cc227a..2dc39adff24=20100644=0A---=20a/libgrust/Makefile.in=0A+++=20= b/libgrust/Makefile.in=0A@@=20-93,6=20+93,7=20@@=20ACLOCAL_M4=20=3D=20= $(top_srcdir)/aclocal.m4=0A=20am__aclocal_m4_deps=20=3D=20= $(top_srcdir)/../config/acx.m4=20\=0A=20=09= $(top_srcdir)/../config/depstand.m4=20\=0A=20=09= $(top_srcdir)/../config/lead-dot.m4=20\=0A+=09= $(top_srcdir)/../config/multi.m4=20\=0A=20=09= $(top_srcdir)/../config/no-executables.m4=20\=0A=20=09= $(top_srcdir)/../config/override.m4=20\=0A=20=09= $(top_srcdir)/../config/toolexeclibdir.m4=20\=0A@@=20-275,6=20+276,7=20= @@=20localedir=20=3D=20@localedir@=0A=20localstatedir=20=3D=20= @localstatedir@=0A=20mandir=20=3D=20@mandir@=0A=20mkdir_p=20=3D=20= @mkdir_p@=0A+multi_basedir=20=3D=20@multi_basedir@=0A=20oldincludedir=20= =3D=20@oldincludedir@=0A=20pdfdir=20=3D=20@pdfdir@=0A=20prefix=20=3D=20= @prefix@=0Adiff=20--git=20a/libgrust/aclocal.m4=20b/libgrust/aclocal.m4=0A= index=201bd42c34d74..5d808f05afa=20100644=0A---=20a/libgrust/aclocal.m4=0A= +++=20b/libgrust/aclocal.m4=0A@@=20-1250,6=20+1250,7=20@@=20= AC_SUBST([am__untar])=0A=20m4_include([../config/acx.m4])=0A=20= m4_include([../config/depstand.m4])=0A=20= m4_include([../config/lead-dot.m4])=0A+m4_include([../config/multi.m4])=0A= =20m4_include([../config/no-executables.m4])=0A=20= m4_include([../config/override.m4])=0A=20= m4_include([../config/toolexeclibdir.m4])=0Adiff=20--git=20= a/libgrust/configure=20b/libgrust/configure=0Aindex=20= 2756bddd10b..282027873bd=20100755=0A---=20a/libgrust/configure=0A+++=20= b/libgrust/configure=0A@@=20-732,6=20+732,7=20@@=20build_os=0A=20= build_vendor=0A=20build_cpu=0A=20build=0A+multi_basedir=0A=20= target_alias=0A=20host_alias=0A=20build_alias=0A@@=20-773,6=20+774,7=20= @@=20SHELL'=0A=20ac_subst_files=3D''=0A=20ac_user_opts=3D'=0A=20= enable_option_checking=0A+enable_multilib=0A=20enable_maintainer_mode=0A=20= enable_silent_rules=0A=20with_toolexeclibdir=0A@@=20-1421,6=20+1423,7=20= @@=20Optional=20Features:=0A=20=20=20--disable-option-checking=20=20= ignore=20unrecognized=20--enable/--with=20options=0A=20=20=20= --disable-FEATURE=20=20=20=20=20=20=20do=20not=20include=20FEATURE=20= (same=20as=20--enable-FEATURE=3Dno)=0A=20=20=20--enable-FEATURE[=3DARG]=20= =20include=20FEATURE=20[ARG=3Dyes]=0A+=20=20--enable-multilib=20=20=20=20= =20=20=20build=20many=20library=20versions=20(default)=0A=20=20=20= --enable-maintainer-mode=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20enable=20make=20rules=20and=20= dependencies=20not=20useful=20(and=0A=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20sometimes=20confusing)=20to=20= the=20casual=20installer=0A@@=20-2376,7=20+2379,43=20@@=20= ac_compiler_gnu=3D$ac_cv_c_compiler_gnu=0A=20= ac_config_files=3D"$ac_config_files=20Makefile"=0A=20=0A=20=0A-#=20= AM_ENABLE_MULTILIB(,=20..)=0A+#=20Default=20to=20--enable-multilib=0A+#=20= Check=20whether=20--enable-multilib=20was=20given.=0A+if=20test=20= "${enable_multilib+set}"=20=3D=20set;=20then=20:=0A+=20=20= enableval=3D$enable_multilib;=20case=20"$enableval"=20in=0A+=20=20yes)=20= multilib=3Dyes=20;;=0A+=20=20no)=20=20multilib=3Dno=20;;=0A+=20=20*)=20=20= =20as_fn_error=20$?=20"bad=20value=20$enableval=20for=20multilib=20= option"=20"$LINENO"=205=20;;=0A+=20esac=0A+else=0A+=20=20multilib=3Dyes=0A= +fi=0A+=0A+=0A+#=20We=20may=20get=20other=20options=20which=20we=20leave=20= undocumented:=0A+#=20--with-target-subdir,=20--with-multisrctop,=20= --with-multisubdir=0A+#=20See=20config-ml.in=20if=20you=20want=20the=20= gory=20details.=0A+=0A+if=20test=20"$srcdir"=20=3D=20".";=20then=0A+=20=20= if=20test=20"$with_target_subdir"=20!=3D=20".";=20then=0A+=20=20=20=20= multi_basedir=3D"$srcdir/$with_multisrctop../.."=0A+=20=20else=0A+=20=20=20= =20multi_basedir=3D"$srcdir/$with_multisrctop.."=0A+=20=20fi=0A+else=0A+=20= =20multi_basedir=3D"$srcdir/.."=0A+fi=0A+=0A+=0A+#=20Even=20if=20the=20= default=20multilib=20is=20not=20a=20cross=20compilation,=0A+#=20it=20may=20= be=20that=20some=20of=20the=20other=20multilibs=20are.=0A+if=20test=20= $cross_compiling=20=3D=20no=20&&=20test=20$multilib=20=3D=20yes=20\=0A+=20= =20=20&&=20test=20"x${with_multisubdir}"=20!=3D=20x=20;=20then=0A+=20=20=20= cross_compiling=3Dmaybe=0A+fi=0A+=0A= +ac_config_commands=3D"$ac_config_commands=20default-1"=0A+=0A=20=0A=20#=20= Do=20not=20delete=20or=20change=20the=20following=20two=20lines.=20=20= For=20why,=20see=0A=20#=20= http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html=0A@@=20-12512,7=20= +12551,7=20@@=20else=0A=20=20=20lt_dlunknown=3D0;=20lt_dlno_uscore=3D1;=20= lt_dlneed_uscore=3D2=0A=20=20=20lt_status=3D$lt_dlunknown=0A=20=20=20cat=20= >=20conftest.$ac_ext=20<<_LT_EOF=0A-#line=2012515=20"configure"=0A+#line=20= 12554=20"configure"=0A=20#include=20"confdefs.h"=0A=20=0A=20#if=20= HAVE_DLFCN_H=0A@@=20-12618,7=20+12657,7=20@@=20else=0A=20=20=20= lt_dlunknown=3D0;=20lt_dlno_uscore=3D1;=20lt_dlneed_uscore=3D2=0A=20=20=20= lt_status=3D$lt_dlunknown=0A=20=20=20cat=20>=20conftest.$ac_ext=20= <<_LT_EOF=0A-#line=2012621=20"configure"=0A+#line=2012660=20"configure"=0A= =20#include=20"confdefs.h"=0A=20=0A=20#if=20HAVE_DLFCN_H=0A@@=20-16804,6=20= +16843,20=20@@=20cat=20>>$CONFIG_STATUS=20<<_ACEOF=20||=20= ac_write_fail=3D1=0A=20#=0A=20#=20INIT-COMMANDS=0A=20#=0A+=0A= +srcdir=3D"$srcdir"=0A+host=3D"$host"=0A+target=3D"$target"=0A= +with_multisubdir=3D"$with_multisubdir"=0A= +with_multisrctop=3D"$with_multisrctop"=0A= +with_target_subdir=3D"$with_target_subdir"=0A= +ac_configure_args=3D"${multilib_arg}=20${ac_configure_args}"=0A= +multi_basedir=3D"$multi_basedir"=0A= +CONFIG_SHELL=3D${CONFIG_SHELL-/bin/sh}=0A+CC=3D"$CC"=0A+CXX=3D"$CXX"=0A= +GFORTRAN=3D"$GFORTRAN"=0A+GDC=3D"$GDC"=0A=20AMDEP_TRUE=3D"$AMDEP_TRUE"=20= ac_aux_dir=3D"$ac_aux_dir"=0A=20=0A=20=0A@@=20-17175,6=20+17228,7=20@@=20= for=20ac_config_target=20in=20$ac_config_targets=0A=20do=0A=20=20=20case=20= $ac_config_target=20in=0A=20=20=20=20=20"Makefile")=20= CONFIG_FILES=3D"$CONFIG_FILES=20Makefile"=20;;=0A+=20=20=20=20= "default-1")=20CONFIG_COMMANDS=3D"$CONFIG_COMMANDS=20default-1"=20;;=0A=20= =20=20=20=20"depfiles")=20CONFIG_COMMANDS=3D"$CONFIG_COMMANDS=20= depfiles"=20;;=0A=20=20=20=20=20"libtool")=20= CONFIG_COMMANDS=3D"$CONFIG_COMMANDS=20libtool"=20;;=0A=20=20=20=20=20= "libproc_macro/Makefile")=20CONFIG_FILES=3D"$CONFIG_FILES=20= libproc_macro/Makefile"=20;;=0A@@=20-17607,6=20+17661,14=20@@=20$as_echo=20= "$as_me:=20executing=20$ac_file=20commands"=20>&6;}=0A=20=0A=20=0A=20=20=20= case=20$ac_file$ac_mode=20in=0A+=20=20=20=20"default-1":C)=0A+#=20Only=20= add=20multilib=20support=20code=20if=20we=20just=20rebuilt=20the=20= top-level=0A+#=20Makefile.=0A+case=20"=20$CONFIG_FILES=20"=20in=0A+=20*"=20= Makefile=20"*)=0A+=20=20=20ac_file=3DMakefile=20.=20= ${multi_basedir}/config-ml.in=0A+=20=20=20;;=0A+esac=20;;=0A=20=20=20=20=20= "depfiles":C)=20test=20x"$AMDEP_TRUE"=20!=3D=20x""=20||=20{=0A=20=20=20#=20= Older=20Autoconf=20quotes=20--file=20arguments=20for=20eval,=20but=20not=20= when=20files=0A=20=20=20#=20are=20listed=20without=20--file.=20=20Let's=20= play=20safe=20and=20only=20enable=20the=20eval=0Adiff=20--git=20= a/libgrust/configure.ac=20b/libgrust/configure.ac=0Aindex=20= 7aed489a643..d75aa632462=20100644=0A---=20a/libgrust/configure.ac=0A+++=20= b/libgrust/configure.ac=0A@@=20-2,7=20+2,7=20@@=20AC_INIT([libgrust],=20= version-unused,,librust)=0A=20AC_CONFIG_SRCDIR(Makefile.am)=0A=20= AC_CONFIG_FILES([Makefile])=0A=20=0A-#=20AM_ENABLE_MULTILIB(,=20..)=0A= +AM_ENABLE_MULTILIB(,=20..)=0A=20=0A=20#=20Do=20not=20delete=20or=20= change=20the=20following=20two=20lines.=20=20For=20why,=20see=0A=20#=20= http://gcc.gnu.org/ml/libstdc++/2003-07/msg00451.html=0Adiff=20--git=20= a/libgrust/libproc_macro/Makefile.in=20= b/libgrust/libproc_macro/Makefile.in=0Aindex=20d3a39736679..46eb6484094=20= 100644=0A---=20a/libgrust/libproc_macro/Makefile.in=0A+++=20= b/libgrust/libproc_macro/Makefile.in=0A@@=20-95,6=20+95,7=20@@=20= ACLOCAL_M4=20=3D=20$(top_srcdir)/aclocal.m4=0A=20am__aclocal_m4_deps=20=3D= =20$(top_srcdir)/../config/acx.m4=20\=0A=20=09= $(top_srcdir)/../config/depstand.m4=20\=0A=20=09= $(top_srcdir)/../config/lead-dot.m4=20\=0A+=09= $(top_srcdir)/../config/multi.m4=20\=0A=20=09= $(top_srcdir)/../config/no-executables.m4=20\=0A=20=09= $(top_srcdir)/../config/override.m4=20\=0A=20=09= $(top_srcdir)/../config/toolexeclibdir.m4=20\=0A@@=20-316,6=20+317,7=20= @@=20localedir=20=3D=20@localedir@=0A=20localstatedir=20=3D=20= @localstatedir@=0A=20mandir=20=3D=20@mandir@=0A=20mkdir_p=20=3D=20= @mkdir_p@=0A+multi_basedir=20=3D=20@multi_basedir@=0A=20oldincludedir=20= =3D=20@oldincludedir@=0A=20pdfdir=20=3D=20@pdfdir@=0A=20prefix=20=3D=20= @prefix@=0A--=20=0A2.39.2=20(Apple=20Git-143)=0A=0A= --Apple-Mail=_E42AE435-C59D-45A9-B0BF-DB5ECCBE6FE7 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 >=20 >=20 > Then: >=20 > On 2023-10-25T13:06:46+0200, Arthur Cohen = wrote: >> From: Pierre-Emmanuel Patry >>=20 >> Add some dummy files in libproc_macro along with its build system. >=20 > I've not reviewed the build system in detail, just had a very quick = look. >=20 > Three instances of 'librust'; should be 'libgrust': >=20 > configure.ac:AC_INIT([libgrust], version-unused,,librust) >=20 > configure.ac:AC_MSG_NOTICE([librust has been configured.]) >=20 > Makefile.am: = "TARGET_LIB_PATH_librust=3D$(TARGET_LIB_PATH_librust)" \ >=20 > Compared to libgomp (which I'm reasonably familiar with), I found = missing > in 'libgrust' at 'configure'-level: >=20 > --enable-multilib build many library versions (default) >=20 > --disable-werror disable building with -Werror >=20 > --enable-symvers=3DSTYLE enables symbol versioning of the shared = library > [default=3Dyes] >=20 > --enable-cet enable Intel CET in target libraries = [default=3Dauto] >=20 > --with-gcc-major-version-only > use only GCC major number in filesystem = paths >=20 > I can't tell off-hand whether all these are important, however. >=20 > Additionally, the new one that's being discussed in > > 'Update libgrust for upstream GCC commit = 6a6d3817afa02bbcd2388c8e005da6faf88932f1 "Config,Darwin: Allow for = configuring Darwin to use embedded runpath"'. >=20 >=20 > Gr=C3=BC=C3=9Fe > Thomas >=20 >=20 >> libgrust/Changelog: >>=20 >> * 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. >>=20 >> 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 >>=20 >> 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 =3D 1.8 foreign >> + >> +SUFFIXES =3D .c .rs .def .o .lo .a >> + >> +ACLOCAL_AMFLAGS =3D -I . -I .. -I ../config >> + >> +AM_CFLAGS =3D -I $(srcdir)/../libgcc -I = $(MULTIBUILDTOP)../../gcc/include >> + >> +TOP_GCCDIR :=3D $(shell cd $(top_srcdir) && cd .. && pwd) >> + >> +GCC_DIR =3D $(TOP_GCCDIR)/gcc >> +RUST_SRC =3D $(GCC_DIR)/rust >> + >> +toolexeclibdir=3D@toolexeclibdir@ >> +toolexecdir=3D@toolexecdir@ >> + >> +SUBDIRS =3D libproc_macro >> + >> +RUST_BUILDDIR :=3D $(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 =3D \ >> + "GCC_DIR=3D$(GCC_DIR)" \ >> + "RUST_SRC=3D$(RUST_SRC)" \ >> + "AR_FLAGS=3D$(AR_FLAGS)" \ >> + "CC_FOR_BUILD=3D$(CC_FOR_BUILD)" \ >> + "CC_FOR_TARGET=3D$(CC_FOR_TARGET)" \ >> + "RUST_FOR_TARGET=3D$(RUST_FOR_TARGET)" \ >> + "CFLAGS=3D$(CFLAGS)" \ >> + "CXXFLAGS=3D$(CXXFLAGS)" \ >> + "CFLAGS_FOR_BUILD=3D$(CFLAGS_FOR_BUILD)" \ >> + "CFLAGS_FOR_TARGET=3D$(CFLAGS_FOR_TARGET)" \ >> + "INSTALL=3D$(INSTALL)" \ >> + "INSTALL_DATA=3D$(INSTALL_DATA)" \ >> + "INSTALL_PROGRAM=3D$(INSTALL_PROGRAM)" \ >> + "INSTALL_SCRIPT=3D$(INSTALL_SCRIPT)" \ >> + "LDFLAGS=3D$(LDFLAGS)" \ >> + "LIBCFLAGS=3D$(LIBCFLAGS)" \ >> + "LIBCFLAGS_FOR_TARGET=3D$(LIBCFLAGS_FOR_TARGET)" \ >> + "MAKE=3D$(MAKE)" \ >> + "MAKEINFO=3D$(MAKEINFO) $(MAKEINFOFLAGS)" \ >> + "PICFLAG=3D$(PICFLAG)" \ >> + "PICFLAG_FOR_TARGET=3D$(PICFLAG_FOR_TARGET)" \ >> + "SHELL=3D$(SHELL)" \ >> + "RUNTESTFLAGS=3D$(RUNTESTFLAGS)" \ >> + "exec_prefix=3D$(exec_prefix)" \ >> + "infodir=3D$(infodir)" \ >> + "libdir=3D$(libdir)" \ >> + "includedir=3D$(includedir)" \ >> + "prefix=3D$(prefix)" \ >> + "tooldir=3D$(tooldir)" \ >> + "gxx_include_dir=3D$(gxx_include_dir)" \ >> + "AR=3D$(AR)" \ >> + "AS=3D$(AS)" \ >> + "LD=3D$(LD)" \ >> + "RANLIB=3D$(RANLIB)" \ >> + "NM=3D$(NM)" \ >> + "NM_FOR_BUILD=3D$(NM_FOR_BUILD)" \ >> + "NM_FOR_TARGET=3D$(NM_FOR_TARGET)" \ >> + "DESTDIR=3D$(DESTDIR)" \ >> + "WERROR=3D$(WERROR)" \ >> + "TARGET_LIB_PATH=3D$(TARGET_LIB_PATH)" \ >> + "TARGET_LIB_PATH_librust=3D$(TARGET_LIB_PATH_librust)" \ >> + "LIBTOOL=3D$(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=3D${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=3Dyes ;; >> + no) version_specific_libs=3Dno ;; >> + *) AC_MSG_ERROR([Unknown argument to enable/disable = version-specific libs]);; >> + esac], >> +[version_specific_libs=3Dno]) >> +AC_MSG_RESULT($version_specific_libs) >> + >> +toolexecdir=3Dno >> +toolexeclibdir=3Dno >> + >> +# 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=3D'$(libdir)/gcc/$(target_noncanonical)' >> + toolexeclibdir=3D'$(toolexecdir)/$(gcc_version)$(MULTISUBDIR)' >> + ;; >> + no) >> + if test -n "$with_cross_host" && >> + test x"$with_cross_host" !=3D x"no"; then >> + # Install a library built with a cross compiler in tooldir, = not libdir. >> + toolexecdir=3D'$(exec_prefix)/$(target_noncanonical)' >> + toolexeclibdir=3D'$(toolexecdir)/lib' >> + else >> + toolexecdir=3D'$(libdir)/gcc-lib/$(target_noncanonical)' >> + toolexeclibdir=3D'$(libdir)' >> + fi >> + multi_os_directory=3D`$CC -print-multi-os-directory` >> + case $multi_os_directory in >> + .) ;; # Avoid trailing /. >> + *) toolexeclibdir=3D$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 =3D' >> $ac_file >> + ml_norecursion=3Dyes >> + 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 =3D .cc .o .a .lo .la >> + >> +ACLOCAL_AMFLAGS =3D -I .. -I ../../config >> + >> +toolexeclibdir=3D@toolexeclibdir@ >> +toolexecdir=3D@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 =3D \ >> + "AR_FLAGS=3D$(AR_FLAGS)" \ >> + "CC_FOR_BUILD=3D$(CC_FOR_BUILD)" \ >> + "CC_FOR_TARGET=3D$(CC_FOR_TARGET)" \ >> + "CFLAGS=3D$(CFLAGS)" \ >> + "CXXFLAGS=3D$(CXXFLAGS)" \ >> + "CFLAGS_FOR_BUILD=3D$(CFLAGS_FOR_BUILD)" \ >> + "CFLAGS_FOR_TARGET=3D$(CFLAGS_FOR_TARGET)" \ >> + "INSTALL=3D$(INSTALL)" \ >> + "INSTALL_DATA=3D$(INSTALL_DATA)" \ >> + "INSTALL_PROGRAM=3D$(INSTALL_PROGRAM)" \ >> + "INSTALL_SCRIPT=3D$(INSTALL_SCRIPT)" \ >> + "LDFLAGS=3D$(LDFLAGS)" \ >> + "LIBCFLAGS=3D$(LIBCFLAGS)" \ >> + "LIBCFLAGS_FOR_TARGET=3D$(LIBCFLAGS_FOR_TARGET)" \ >> + "MAKE=3D$(MAKE)" \ >> + "MAKEINFO=3D$(MAKEINFO) $(MAKEINFOFLAGS)" \ >> + "PICFLAG=3D$(PICFLAG)" \ >> + "PICFLAG_FOR_TARGET=3D$(PICFLAG_FOR_TARGET)" \ >> + "SHELL=3D$(SHELL)" \ >> + "RUNTESTFLAGS=3D$(RUNTESTFLAGS)" \ >> + "exec_prefix=3D$(exec_prefix)" \ >> + "infodir=3D$(infodir)" \ >> + "libdir=3D$(libdir)" \ >> + "includedir=3D$(includedir)" \ >> + "prefix=3D$(prefix)" \ >> + "tooldir=3D$(tooldir)" \ >> + "gxx_include_dir=3D$(gxx_include_dir)" \ >> + "AR=3D$(AR)" \ >> + "AS=3D$(AS)" \ >> + "LD=3D$(LD)" \ >> + "RANLIB=3D$(RANLIB)" \ >> + "NM=3D$(NM)" \ >> + "NM_FOR_BUILD=3D$(NM_FOR_BUILD)" \ >> + "NM_FOR_TARGET=3D$(NM_FOR_TARGET)" \ >> + "DESTDIR=3D$(DESTDIR)" \ >> + "WERROR=3D$(WERROR)" \ >> + "TARGET_LIB_PATH=3D$(TARGET_LIB_PATH)" \ >> + "TARGET_LIB_PATH_libgm2=3D$(TARGET_LIB_PATH_libgm2)" >> + >> +toolexeclib_LTLIBRARIES =3D libproc_macro.la >> + >> +libproc_macro_la_SOURCES =3D \ >> + proc_macro.cc >> + >> +include_HEADERS =3D \ >> + 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=C3=9Fe = 201, 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; = Gesch=C3=A4ftsf=C3=BChrer: Thomas Heurung, Frank Th=C3=BCrauf; Sitz der = Gesellschaft: M=C3=BCnchen; Registergericht M=C3=BCnchen, HRB 106955 --Apple-Mail=_E42AE435-C59D-45A9-B0BF-DB5ECCBE6FE7--