public inbox for gcc-rust@gcc.gnu.org
 help / color / mirror / Atom feed
From: Arthur Cohen <arthur.cohen@embecosm.com>
To: Thomas Schwinge <tschwinge@baylibre.com>,
	gcc-patches@gcc.gnu.org, gcc-rust@gcc.gnu.org,
	Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
Subject: Re: [gcc r14-7544] gccrs: libproc_macro: Build statically
Date: Tue, 16 Apr 2024 10:58:07 +0200	[thread overview]
Message-ID: <72f2b604-fd78-4504-96f7-54a1dcdd2f08@embecosm.com> (raw)
In-Reply-To: <87h6g2evei.fsf@euler.schwinge.ddns.net>

Morning Thomas,

On 4/15/24 13:07, Thomas Schwinge wrote:
> Hi!
> 
> On 2024-01-16T17:43:10+0000, Arthur Cohen via Gcc-cvs <gcc-cvs@gcc.gnu.org> wrote:
>> https://gcc.gnu.org/g:71180a9eed367667e7b2c3f6aea1ee1bba15e9b3
>>
>> commit r14-7544-g71180a9eed367667e7b2c3f6aea1ee1bba15e9b3
>> Author: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
>> 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"

Thanks, that looks good :) Same question as on the other thread: do you 
want me to open a PR for these on github or do you want to do it yourself?

Kindly,

Arthur

> 
> 
> Grüße
>   Thomas
> 
> 

      reply	other threads:[~2024-04-16  8:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240116174310.2CC5A3858439@sourceware.org>
2024-04-15 11:07 ` Thomas Schwinge
2024-04-16  8:58   ` Arthur Cohen [this message]

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=72f2b604-fd78-4504-96f7-54a1dcdd2f08@embecosm.com \
    --to=arthur.cohen@embecosm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gcc-rust@gcc.gnu.org \
    --cc=pierre-emmanuel.patry@embecosm.com \
    --cc=tschwinge@baylibre.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).