public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Why target program depends from system GCC
@ 2014-11-09 17:13 niXman
  2014-11-09 18:07 ` Jonathan Wakely
  0 siblings, 1 reply; 2+ messages in thread
From: niXman @ 2014-11-09 17:13 UTC (permalink / raw)
  To: gcc-help


Hi,

I have built & installed GCC-4.9.2 in '/usr/local'.
When I build some program, it depends from libstdc++ provided by system, 
but not installed GCC-4.9.2. Why?

gcc flags:
--prefix=/usr/local
--host=x86_64-linux-gnu
--build=x86_64-linux-gnu
--target=x86_64-linux-gnu
--enable-bootstrap
--disable-nls
--disable-multilib
--enable-languages=c,c++
--enable-threads=posix
--enable-libstdcxx-time=yes
--disable-werror
--with-tune=generic
--enable-checking=release


program compiled:
g++ hello.cpp -ohello

show deps:
ldd ./hello
linux-vdso.so.1 =>  (0x00007fff60bfe000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 
(0x00007f5793bb1000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f57938ab000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 
(0x00007f5793694000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f57932ce000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5793ee2000)


Ubuntu-14.10-x86_64 is used.


-- 
Regards, niXman
___________________________________________________
Dual-target(32 & 64-bit) MinGW-W64 compilers for 32 and 64-bit Windows:
http://sourceforge.net/projects/mingw-w64/
___________________________________________________
Another online IDE: http://liveworkspace.org/

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

* Re: Why target program depends from system GCC
  2014-11-09 17:13 Why target program depends from system GCC niXman
@ 2014-11-09 18:07 ` Jonathan Wakely
  0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Wakely @ 2014-11-09 18:07 UTC (permalink / raw)
  To: niXman; +Cc: gcc-help

On 9 November 2014 17:13, niXman wrote:
>
> Hi,
>
> I have built & installed GCC-4.9.2 in '/usr/local'.
> When I build some program, it depends from libstdc++ provided by system, but
> not installed GCC-4.9.2. Why?

Because you didn't say you wanted something different, so the dynamic
linker looks in the normal places it looks to find library
dependencies.

https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.how_to_set_paths

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

end of thread, other threads:[~2014-11-09 18:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-09 17:13 Why target program depends from system GCC niXman
2014-11-09 18:07 ` Jonathan Wakely

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