public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* [lto] LDFLAGS get lost in stage2
@ 2009-05-19 12:23 Eric Fisher
  2009-05-19 12:57 ` Diego Novillo
  2009-05-19 17:56 ` Joseph S. Myers
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Fisher @ 2009-05-19 12:23 UTC (permalink / raw)
  To: gcc

Hello,

I have the libelf installed in a non-standard path, so when I build
the lto branch, I set the such env variables,

$ export CPPFLAGS="-I<path-to-libelf-headers>"  <- Only needed if
libelf is in a non-standard path
$ export LDFLAGS="-L<path-to-libelf-lib>"       <- Only needed if
libelf is in a non-standard path

But, lto-plugin is failed in stage2 with the error

/usr/bin/ld: cannot find -lelf

I look into the Makefile and find that LDFLAGS is set as BOOT_LDFLAGS
scine stage2, so I have to set this variable also.

Is it a right way that it should go?

Best wishes,

Eric Fisher

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [lto] LDFLAGS get lost in stage2
  2009-05-19 12:23 [lto] LDFLAGS get lost in stage2 Eric Fisher
@ 2009-05-19 12:57 ` Diego Novillo
  2009-05-19 17:56 ` Joseph S. Myers
  1 sibling, 0 replies; 4+ messages in thread
From: Diego Novillo @ 2009-05-19 12:57 UTC (permalink / raw)
  To: Eric Fisher; +Cc: gcc

On Tue, May 19, 2009 at 02:29, Eric Fisher <joefoxreal@gmail.com> wrote:

> I look into the Makefile and find that LDFLAGS is set as BOOT_LDFLAGS
> scine stage2, so I have to set this variable also.
>
> Is it a right way that it should go?

Yes, thanks for catching this.  I will update the wiki.


Diego.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [lto] LDFLAGS get lost in stage2
  2009-05-19 12:23 [lto] LDFLAGS get lost in stage2 Eric Fisher
  2009-05-19 12:57 ` Diego Novillo
@ 2009-05-19 17:56 ` Joseph S. Myers
  2009-05-19 18:26   ` Diego Novillo
  1 sibling, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2009-05-19 17:56 UTC (permalink / raw)
  To: Eric Fisher; +Cc: gcc

On Tue, 19 May 2009, Eric Fisher wrote:

> Hello,
> 
> I have the libelf installed in a non-standard path, so when I build
> the lto branch, I set the such env variables,
> 
> $ export CPPFLAGS="-I<path-to-libelf-headers>"  <- Only needed if
> libelf is in a non-standard path
> $ export LDFLAGS="-L<path-to-libelf-lib>"       <- Only needed if
> libelf is in a non-standard path

LTO needs a --with-libelf configure option before it merges to trunk, if 
it doesn't already have one, as with the options for all the other host 
libraries used by GCC.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [lto] LDFLAGS get lost in stage2
  2009-05-19 17:56 ` Joseph S. Myers
@ 2009-05-19 18:26   ` Diego Novillo
  0 siblings, 0 replies; 4+ messages in thread
From: Diego Novillo @ 2009-05-19 18:26 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: Eric Fisher, gcc

On Tue, May 19, 2009 at 11:18, Joseph S. Myers <joseph@codesourcery.com> wrote:
> On Tue, 19 May 2009, Eric Fisher wrote:
>
>> Hello,
>>
>> I have the libelf installed in a non-standard path, so when I build
>> the lto branch, I set the such env variables,
>>
>> $ export CPPFLAGS="-I<path-to-libelf-headers>"  <- Only needed if
>> libelf is in a non-standard path
>> $ export LDFLAGS="-L<path-to-libelf-lib>"       <- Only needed if
>> libelf is in a non-standard path
>
> LTO needs a --with-libelf configure option before it merges to trunk, if
> it doesn't already have one, as with the options for all the other host
> libraries used by GCC.

Of course.  It's on my todo list.  Patches welcome.


Diego.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-05-19 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-19 12:23 [lto] LDFLAGS get lost in stage2 Eric Fisher
2009-05-19 12:57 ` Diego Novillo
2009-05-19 17:56 ` Joseph S. Myers
2009-05-19 18:26   ` Diego Novillo

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).