public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/15887] New: [HPUX] libgcc and libgcc_s are not equivalent - cannot link libgcc staticly (can't find __main symbol)
@ 2004-06-09  6:14 cruvolo at inviosoftware dot com
  2004-06-09  6:29 ` [Bug c/15887] " cruvolo at inviosoftware dot com
  0 siblings, 1 reply; 2+ messages in thread
From: cruvolo at inviosoftware dot com @ 2004-06-09  6:14 UTC (permalink / raw)
  To: gcc-bugs

Using gcc 3.2.2 on HPUX 11.00 with binutils 2.13.2.


Configured with: ../gcc-3.2.2/configure --prefix=/usr/local/fbe/2.0 --with-stabs
--enable-shared --disable-nls --enable-languages=c,c++ --enable-threads=posix

This simple hello world program cannot be linked with libgcc.a.  It succeeds
with libgcc_s.sl:

> cat helloworld.c
#include <stdio.h>

int
main(void)
{
  printf("Hello, world!\n");
  return 0;
}


> /usr/local/fbe/2.0/bin/gcc -nodefaultlibs -L/usr/local/fbe/2.0/lib -lc -lgcc
-o helloworld helloworld.c
/usr/ccs/bin/ld: Unsatisfied symbols:
   __main (first referenced in /var/tmp//ccu5QKvn.o) (code)
collect2: ld returned 1 exit status

> /usr/local/fbe/2.0/bin/gcc -nodefaultlibs -L/usr/local/fbe/2.0/lib -lc -lgcc_s
-o helloworld helloworld.c
> ./helloworld
Hello, world!


> nm /usr/local/fbe/2.0/lib/gcc-lib/hppa2.0w-hp-hpux11.00/3.2.2/libgcc.a | grep main
__main.o:
00000000 T __main

> nm /usr/local/fbe/2.0/lib/libgcc_s.sl | grep main
000065f8 T __main
00006628 T __main

-- 
           Summary: [HPUX] libgcc and libgcc_s are not equivalent - cannot
                    link libgcc staticly (can't find __main symbol)
           Product: gcc
           Version: 3.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: cruvolo at inviosoftware dot com
                CC: gcc-bugs at gcc dot gnu dot org
 GCC build triplet: hppa2.0w-hp-hpux11.00
  GCC host triplet: hppa2.0w-hp-hpux11.00
GCC target triplet: hppa2.0w-hp-hpux11.00


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15887


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

* [Bug c/15887] [HPUX] libgcc and libgcc_s are not equivalent - cannot link libgcc staticly (can't find __main symbol)
  2004-06-09  6:14 [Bug c/15887] New: [HPUX] libgcc and libgcc_s are not equivalent - cannot link libgcc staticly (can't find __main symbol) cruvolo at inviosoftware dot com
@ 2004-06-09  6:29 ` cruvolo at inviosoftware dot com
  0 siblings, 0 replies; 2+ messages in thread
From: cruvolo at inviosoftware dot com @ 2004-06-09  6:29 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cruvolo at inviosoftware dot com  2004-06-09 06:29 -------
Bah!  Nevermind, the stupid HPUX linker is order-senitive.  If I put -lgcc as
the last thing in the command line, it works.   Closing INVALID.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15887


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

end of thread, other threads:[~2004-06-09  6:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-06-09  6:14 [Bug c/15887] New: [HPUX] libgcc and libgcc_s are not equivalent - cannot link libgcc staticly (can't find __main symbol) cruvolo at inviosoftware dot com
2004-06-09  6:29 ` [Bug c/15887] " cruvolo at inviosoftware dot com

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