This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/15887] New: [HPUX] libgcc and libgcc_s are not equivalent - cannot link libgcc staticly (can't find __main symbol)
- From: "cruvolo at inviosoftware dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Jun 2004 06:14:34 -0000
- Subject: [Bug c/15887] New: [HPUX] libgcc and libgcc_s are not equivalent - cannot link libgcc staticly (can't find __main symbol)
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
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