public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: Vincent Lefevre <vincent+gcc@vinc17.org>
To: gcc-help@gcc.gnu.org
Subject: Re: shared libraries + lto ?
Date: Sun, 03 Aug 2014 14:48:00 -0000	[thread overview]
Message-ID: <20140803144834.GA19888@xvii.vinc17.org> (raw)
In-Reply-To: <DUB121-W22CA92DA02A75D1ACCFFF2B7E70@phx.gbl>

On 2014-08-01 13:59:28 +0200, Alain Meunier wrote:
[...]
> Both compiled with gcc 
> gcc /*optim. flags here*/ -fPIC foo.c -o libfoo.a -flto
> gcc /*optim. flags here*/ -fPIC bar.c -o libbar.a -flto
>  
> and a main program my_app.c :
>  
> #include here
> int main(){
>     int f1 = 5;
>     int f2 = 3;
>     cool(&f1,&f2);
>     eatTheWorld(&f1,&f2)
>  
> return 0;
> }
>  
> I will compile it with
> gcc /*optim. flags here*/  my_app.c -lfoo -lbar -flto
>  
> Is that it ? Nothing more ?

I compiled everything with "-flto=jobserve -fuse-linker-plugin"
(that was two years ago), but I don't know whether this is still
necessary.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

      reply	other threads:[~2014-08-03 14:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-01  9:09 Alain Meunier
2014-08-01 10:47 ` Vincent Lefevre
2014-08-01 11:59   ` Alain Meunier
2014-08-03 14:48     ` Vincent Lefevre [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=20140803144834.GA19888@xvii.vinc17.org \
    --to=vincent+gcc@vinc17.org \
    --cc=gcc-help@gcc.gnu.org \
    /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).