public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* IA64 HP-UX bootstrap with C++
@ 2011-07-22 23:24 Steve Ellcey
  2011-07-23 10:03 ` Joseph S. Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Steve Ellcey @ 2011-07-22 23:24 UTC (permalink / raw)
  To: gcc-patches; +Cc: ro


The HP-UX bootstrap has been failing since the switch to C++.  The
first problem was the strsignal problem that Tru64 was also having and
the fix for Tru64 fixes things on HP-UX too.  But after I applied
that patch, I got a good build with no errors, and I got a good
test run, but when I went to run the compiler from it's installed
location I got this:

$ /proj/opensrc/nightly/gcc-ia64-hp-hpux11.23-trunk/bin/gcc      
/usr/lib/hpux32/dld.so: Unable to find library 'libgcc_s.so.0'.

gcc (the driver) is now linked with C++ instead of C and
that means it wants to use the shared libgcc instead of the
archive one but it cannot find it.

Looking at the gcc driver, it has an embedded search path for
the build locations but not the installed location.  I am not
sure why that wouldn't work (if the build location existed) because
in my case it does and one of the directories to be searched
does include libgcc_s.so.0.

I will keep investigating but I thought I would see if anyone
else has seen this.  Note that a 'make check' did not find this,
I had to run gcc from it's installed location to see the failure.

GCC is using the HP linker on IA64 HP-UX, not the GNU linker so that
may be an issue as well, particularly if this only fails on HP-UX.

Steve Ellcey
sje@cup.hp.com

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

* Re: IA64 HP-UX bootstrap with C++
  2011-07-22 23:24 IA64 HP-UX bootstrap with C++ Steve Ellcey
@ 2011-07-23 10:03 ` Joseph S. Myers
  2011-07-25 17:32   ` Rainer Orth
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2011-07-23 10:03 UTC (permalink / raw)
  To: sje; +Cc: gcc-patches, ro

On Fri, 22 Jul 2011, Steve Ellcey wrote:

> $ /proj/opensrc/nightly/gcc-ia64-hp-hpux11.23-trunk/bin/gcc      
> /usr/lib/hpux32/dld.so: Unable to find library 'libgcc_s.so.0'.
> 
> gcc (the driver) is now linked with C++ instead of C and
> that means it wants to use the shared libgcc instead of the
> archive one but it cannot find it.

The default is supposed to be linking with static libgcc and libstdc++ if 
you don't use configure options such as --with-boot-ldflags.

[poststage1_ldflags=
 # In stages 2 and 3, default to linking libstdc++ and libgcc
 # statically.  But if the user explicitly specified the libraries to
 # use, trust that they are doing what they want.
 if test "$poststage1_libs" = ""; then
   poststage1_ldflags="-static-libstdc++ -static-libgcc"
 fi])

Are -static-libstdc++ and -static-libgcc not working for you (with the 
stage 1 compiler when it's used to link stage 2, and the stage 2 compiler 
used to link stage 3)?  If not, fixing them if possible would be the right 
approach.

-- 
Joseph S. Myers
joseph@codesourcery.com

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

* Re: IA64 HP-UX bootstrap with C++
  2011-07-23 10:03 ` Joseph S. Myers
@ 2011-07-25 17:32   ` Rainer Orth
  2011-07-26  1:29     ` Steve Ellcey
  0 siblings, 1 reply; 4+ messages in thread
From: Rainer Orth @ 2011-07-25 17:32 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: sje, gcc-patches

Joseph,

> Are -static-libstdc++ and -static-libgcc not working for you (with the 
> stage 1 compiler when it's used to link stage 2, and the stage 2 compiler 
> used to link stage 3)?  If not, fixing them if possible would be the right 
> approach.

unless HP-UX ld supports -Bstatic/-Bdynamic and --help, the
corresponding section in gcc/configure.ac (gcc_cv_ld_static_dynamic and
friends) needs to be updated.  I had to do the same for Solaris, IRIX
and Tru64 UNIX.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

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

* Re: IA64 HP-UX bootstrap with C++
  2011-07-25 17:32   ` Rainer Orth
@ 2011-07-26  1:29     ` Steve Ellcey
  0 siblings, 0 replies; 4+ messages in thread
From: Steve Ellcey @ 2011-07-26  1:29 UTC (permalink / raw)
  To: Rainer Orth, Joseph S. Myers; +Cc: gcc-patches

On Mon, 2011-07-25 at 19:06 +0200, Rainer Orth wrote:
> Joseph,
> 
> > Are -static-libstdc++ and -static-libgcc not working for you (with the 
> > stage 1 compiler when it's used to link stage 2, and the stage 2 compiler 
> > used to link stage 3)?  If not, fixing them if possible would be the right 
> > approach.
> 
> unless HP-UX ld supports -Bstatic/-Bdynamic and --help, the
> corresponding section in gcc/configure.ac (gcc_cv_ld_static_dynamic and
> friends) needs to be updated.  I had to do the same for Solaris, IRIX
> and Tru64 UNIX.
> 
> 	Rainer

I think you and Joseph are right.  I need to define
gcc_cv_ld_static_dynamic and friends to get -static-libstdc++ and
-static-libgcc to work properly.  The problem is that when I do this
it gets used for -lunwind as well as libgcc and libstdc++.  I use the
HP-UX system libunwind and that comes as a shared library only.  So I
need to have some kind of an override so that even when
USE_LIBUNWIND_EXCEPTIONS and HAVE_LD_STATIC_DYNAMIC are set I don't try
to use a static unwind library.  I am testing with a hack right now to
verify that it all works when I do override this part of the driver to
use a dynamic libunwind even with -static-libgcc and -static-libstdc++.

Steve Ellcey
sje@cup.hp.com


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

end of thread, other threads:[~2011-07-25 23:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-22 23:24 IA64 HP-UX bootstrap with C++ Steve Ellcey
2011-07-23 10:03 ` Joseph S. Myers
2011-07-25 17:32   ` Rainer Orth
2011-07-26  1:29     ` Steve Ellcey

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