This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
[PATCH] Current CVS refuses to build under IRIX 6.5
- To: libstdc++@sourceware.cygnus.com
- Subject: [PATCH] Current CVS refuses to build under IRIX 6.5
- From: Gilles Zunino <Gilles.Zunino@hei.fupl.asso.fr>
- Date: Fri, 25 Jun 1999 12:44:07 +0200
- Organization: Hautes Etudes Industrielles
Hi,
The current snapshot fails to build under IRIX 6.5.
The build process emits link errors when building
"gen-num-limits". Since the numeric limits are not
fully generated, the next part of the build fails
badly. Errors messages when building "gen-num-limits"
are :
./gen-num-limitsld32: ERROR 33: Unresolved text symbol "abort" -- 1st
referenced by
/usr/people/gilles/gcc/lib/gcc-lib/mips-sgi-irix6.5/gcc-2.95/libgcc.a(frame.o).
Use linker option -v to see when and which objects, archives and
dsos are loaded.
ld32: ERROR 33: Unresolved text symbol "free" -- 1st referenced by
/usr/people/gilles/gcc/lib/gcc-lib/mips-sgi-irix6.5/gcc-2.95/libgcc.a(frame.o).
Use linker option -v to see when and which objects, archives and
dsos are loaded.
ld32: ERROR 33: Unresolved text symbol "malloc" -- 1st referenced by
/usr/people/gilles/gcc/lib/gcc-lib/mips-sgi-irix6.5/gcc-2.95/libgcc.a(frame.o).
Use linker option -v to see when and which objects, archives and
dsos are loaded.
ld32: ERROR 33: Unresolved text symbol "strcmp" -- 1st referenced by
/usr/people/gilles/gcc/lib/gcc-lib/mips-sgi-irix6.5/gcc-2.95/libgcc.a(frame.o).
Use linker option -v to see when and which objects, archives and
dsos are loaded.
ld32: ERROR 33: Unresolved text symbol "strlen" -- 1st referenced by
/usr/people/gilles/gcc/lib/gcc-lib/mips-sgi-irix6.5/gcc-2.95/libgcc.a(frame.o).
Use linker option -v to see when and which objects, archives and
dsos are loaded.
ld32: ERROR 33: Unresolved text symbol "memset" -- 1st referenced by
/usr/people/gilles/gcc/lib/gcc-lib/mips-sgi-irix6.5/gcc-2.95/libgcc.a(frame.o).
Use linker option -v to see when and which objects, archives and
dsos are loaded.
ld32: INFO 152: Output file removed because of error.
collect2: ld returned 2 exit status
After investigating this, I noticed that the flags given
to the compiler are (among others) : -nodefaultlibs -lc -lgcc
The order of the libraries on the command line is very
important for IRIX linker and it appears that passing
-lgcc before -lc fixes the problem :-(
It is very strange, but what can we do !
So, Here is a patch against the current CVS to make
libstdc++ build under IRIX. I was able to compile the
lib successfully.
Changelog :
1999-06-25 Gilles Zunino <Gilles.Zunino@hei.fr>
* mknumeric_limits: Swap order of -lc and -lgcc in
definition of LDFLAGS.
cvs server: Diffing libstdc++
Index: libstdc++/mknumeric_limits
===================================================================
RCS file: /cvs/libstdc++/libstdc++/mknumeric_limits,v
retrieving revision 1.8
diff -c -3 -p -r1.8 mknumeric_limits
*** mknumeric_limits 1999/06/07 09:22:29 1.8
--- mknumeric_limits 1999/06/25 10:32:56
***************
*** 9,15 ****
echo "running mknumeric_limits"
CXX=g++
! LDFLAGS=-'nodefaultlibs -lc -lgcc'
BUILD_DIR=$1
if [ ! -d "$BUILD_DIR" ]; then
echo "build directory $BUILD_DIR not found, exiting."
--- 9,15 ----
echo "running mknumeric_limits"
CXX=g++
! LDFLAGS=-'nodefaultlibs -lgcc -lc'
BUILD_DIR=$1
if [ ! -d "$BUILD_DIR" ]; then
echo "build directory $BUILD_DIR not found, exiting."
_________________________________________________________________
Gilles Zunino - (Gilles.Zunino@hei.fupl.asso.fr) (A 506) 7636
HEI, 13 rue de Toul, 59 046 LILLE CEDEX FRANCE
Phone : (+33) 3 28.38.48.58 Fax : (+33) 3 28.38.48.04