This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Problem with -funsafe-math-optimizations on alpha-dec-osf4.0f (gcc 3.1)
- From: Bert Deknuydt <Bert dot Deknuydt at esat dot kuleuven dot ac dot be>
- To: gcc at gcc dot gnu dot org
- Date: Thu, 23 May 2002 16:37:01 +0200
- Subject: Problem with -funsafe-math-optimizations on alpha-dec-osf4.0f (gcc 3.1)
Hello,
I get un unresolved symbol '__ieee_set_fp_control' when I compile with
'-funsafe-math-optimizations' (or -ffast-math) on Alpha.
> gcc -v
Reading specs from /freeware/gcc/alpha/lib/gcc-lib/alpha-dec-osf4.0f/3.1/specs
Configured with: /freeware/gcc/gcc/gcc-3.1/configure --prefix=/freeware/gcc --exec-prefix=/freeware/gcc/alpha --with-local-prefix=/freeware/gcc --enable-version-specific-runtime-libs --enable-languages=c++,f77,java --enable-threads=posix alpha-dec-osf4.0f
Thread model: posix
> gcc -o junk speedfp.c -lm
> ./junk
> gcc -ffast-math -o junk speedfp.c -lm
__ieee_set_fp_control
collect2: ld returned 1 exit status
The symbol is
needed in .../gcc-lib/alpha-dec-osf4.0f/3.1/crtfastmath.o. It appears that
this file is linked in only when '-funsafe...' is on. However, the link
line is
> gcc -v -ffast-math -o junk speedfp.c -lm
[delete non relevant stuff, split long lines]
/freeware/gcc/alpha/lib/gcc-lib/alpha-dec-osf4.0f/3.1/collect2 -G 8 -O1 -S \
-call_shared -o junk -rpath /freeware/gcc/alpha/lib /usr/lib/cmplrs/cc/crt0.o \
-L/freeware/gcc/alpha/lib/gcc-lib/alpha-dec-osf4.0f/3.1
-L/usr/lib/cmplrs/cc \
-L/freeware/gcc/alpha/lib/gcc-lib/alpha-dec-osf4.0f/3.1/../../.. \
/var/tmp/cc04boMB.o -lm -lgcc -lgcc_eh -lc -lgcc -lgcc_eh
/freeware/gcc/alpha/lib/gcc-lib/alpha-dec-osf4.0f/3.1/crtfastmath.o
__ieee_set_fp_control
collect2: ld returned 1 exit status
So crtfastmath.o is added at the end of the line. But it should be in
front of '-lm' ...
Greetings,
Bert.
--
-------------- eMail Bert.Deknuydt@esat.kuleuven.ac.be ---------------
B.DeKnuydt, PSI-KULeuven Tel. +32-16-321880
Kasteelpark Arenberg 10 /| | ||
B-3001 Leuven-Heverlee _,_)| 4_|_||
FLANDERS, BELGIUM / . Fax. +32-16-321838
-------------- http://www.esat.kuleuven.ac.be/~deknuydt --------------
Cursed be man! How ungrateful is he! Qur'An 80, 17