All libgomp tests fail to link on IRIX 6:

Executing on host: /vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/xgcc
-B/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/
/vol/gcc/src/gcc-dist/libgomp/testsuite/libgomp.fortran/appendix-a/a.16.1.f90 
-B/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/
-I/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp
-I/vol/gcc/src/gcc-dist/libgomp/testsuite/.. -fmessage-length=0 -fopenmp  -O0  
  -L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/.libs
-lgomp
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/../libgfortran/.libs
-lgfortranbegin -lgfortran -lm   -o ./a.16.1.exe    (timeout = 300)
ld32: ERROR   33 : Unresolved data symbol "copysignl" -- 1st referenced by
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/libgcc.a(_divtc3.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
compiler exited with status 1

This happens because libgcc contains an undefined reference to copysignl.
This function is present in libm, but libm is before libgcc on the linker
command line, as can be seen with -v:

 /vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/collect2 -call_shared
-no_unresolved -init __gcc_init -fini __gcc_fini -_SYSTYPE_SVR4 -woff 131 -n32
-o ./a.16.1.exe /usr/lib32/mips3/crt1.o
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/irix-crti.o
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/crtbegin.o
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/.libs
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp/../libgfortran/.libs
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc
-L/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/mips-sgi-irix6.5/./libgomp
-L/lib/../lib32 -L/usr/lib/../lib32 /var/tmp//ccCchLrr.o -lgomp -lgfortranbegin
-lgfortran -lm -lgomp -dont_warn_unused -lgcc -lgcc_eh -warn_unused
-L/usr/lib32/mips3 -L/usr/lib32 -dont_warn_unused -lpthread -lc -warn_unused
-dont_warn_unused -lgcc -lgcc_eh -warn_unused
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/crtend.o
/vol/gcc/obj/gcc-4.3.0-20070622/6.5-gcc/gcc/irix-crtn.o /usr/lib32/mips3/crtn.o

The 4.2 branch is affected as well.

Environment:
System: IRIX64 columba 6.5 07010238 IP27



host: mips-sgi-irix6.5
build: mips-sgi-irix6.5
target: mips-sgi-irix6.5
configured with: /vol/gcc/src/gcc-dist/configure --prefix=/vol/gcc
--with-local-prefix=/vol/gcc --disable-nls --with-gnu-as
--with-as=/vol/gcc/lib/gas-2.17 --enable-libgcj --with-gmp=/vol/gcc
--with-mpfr=/vol/gcc --disable-libmudflap
--enable-languages=c,ada,c++,fortran,objc --no-create --no-recursion

How-To-Repeat:
Bootstrap and test as described above.


------- Comment #1 from ro at techfak dot uni-bielefeld dot de  2007-06-28 
17:35 -------
Fix:
There are two possible solutions: 

* add -lgcc -lm to the link_gomp spec (this is obviously a hack)

* add -lm to the libgcc spec (this seems to be the proper solution)

Comments?


-- 
           Summary: All libgomp tests fail to link on IRIX 6: copysignl
                    undefined
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: ro at techfak dot uni-bielefeld dot de
 GCC build triplet: mips-sgi-irix6.5
  GCC host triplet: mips-sgi-irix6.5
GCC target triplet: mips-sgi-irix6.5


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

Reply via email to