Hi! On 2024-01-16T17:43:10+0000, Arthur Cohen via Gcc-cvs wrote: > https://gcc.gnu.org/g:71180a9eed367667e7b2c3f6aea1ee1bba15e9b3 > > commit r14-7544-g71180a9eed367667e7b2c3f6aea1ee1bba15e9b3 > Author: Pierre-Emmanuel Patry > Date: Wed Apr 26 10:31:35 2023 +0200 > > gccrs: libproc_macro: Build statically > > We do not need dynamic linking, all use case of this library cover can > be done statically hence the change. > > gcc/rust/ChangeLog: > > * Make-lang.in: Link against the static libproc_macro. > --- a/gcc/rust/Make-lang.in > +++ b/gcc/rust/Make-lang.in > @@ -182,11 +182,14 @@ RUST_ALL_OBJS = $(GRS_OBJS) $(RUST_TARGET_OBJS) > > rust_OBJS = $(RUST_ALL_OBJS) rust/rustspec.o > > +RUST_LDFLAGS = $(LDFLAGS) -L./../libgrust/libproc_macro > +RUST_LIBDEPS = $(LIBDEPS) ../libgrust/libproc_macro/libproc_macro.a > + > # The compiler itself is called crab1 > -crab1$(exeext): $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBDEPS) $(rust.prev) > +crab1$(exeext): $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(RUST_LIBDEPS) $(rust.prev) > @$(call LINK_PROGRESS,$(INDEX.rust),start) > - +$(LLINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ > - $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBS) $(BACKENDLIBS) > + +$(LLINKER) $(ALL_LINKERFLAGS) $(RUST_LDFLAGS) -o $@ \ > + $(RUST_ALL_OBJS) attribs.o $(BACKEND) $(LIBS) ../libgrust/libproc_macro/libproc_macro.a $(BACKENDLIBS) > @$(call LINK_PROGRESS,$(INDEX.rust),end) The 'crab1' compiler is (at least potentially) just one of several executables that 'gcc/rust/Make-lang.in' may build, which may all have different library dependencies, etc. Instead of via generic 'RUST_[...]' variables, those dependencies etc. should therefore be specified as they are individually necessary. I've pushed to trunk branch the following clean-up commits, see attached: - commit cb70a49b30f0a22ec7a1b7df29c3ab370d603f90 "Remove 'libgrust/libproc_macro_internal' from 'gcc/rust/Make-lang.in:RUST_LDFLAGS'" - commit f7c8fa7280c85cbdea45be9c09f36123ff16a78a "Inline 'gcc/rust/Make-lang.in:RUST_LDFLAGS' into single user" - commit 24d92f65f9ed9b3c730c59f700ce2f5c038c8207 "Add 'gcc/rust/Make-lang.in:LIBPROC_MACRO_INTERNAL'" - commit e3fda76af4f342ad1ba8bd901a72d811e8357e99 "Inline 'gcc/rust/Make-lang.in:RUST_LIBDEPS' into single user" Grüße Thomas