Actually, between both sparc and x86 with cc and gcc I run into almost the same problem as neko, and its almost the same problem between compilers. (Solaris 10 u8, SStudio12, gcc 3.4.3).
Code:
SPARC gcc:
-bash-3.00# gcc -m64 -m128bit-long-double machar.c -o machar -lm
cc1: error: invalid option `128bit-long-double'
-bash-3.00# gcc -m64 machar.c -o machar -lm
Undefined first referenced
symbol in file
finitel /var/tmp//ccSos1ez.o
ld: fatal: Symbol referencing errors. No output written to machar
collect2: ld returned 1 exit status
-bash-3.00#
Code:
SPARC cc:
-bash-3.00# cc -64 machar.c -o machar -lm
cc: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise
"machar.c", line 106: warning: argument #2 is incompatible with prototype:
prototype: pointer to function(int) returning void : "/usr/include/iso/signal_iso.h", line 48
argument : pointer to void
"machar.c", line 168: warning: argument #2 is incompatible with prototype:
prototype: pointer to function(int) returning void : "/usr/include/iso/signal_iso.h", line 48
argument : pointer to void
"machar.c", line 417: warning: implicit function declaration: finite
"machar.c", line 648: warning: implicit function declaration: finitel
ld: fatal: file /opt/sunstudio12.1/prod/lib/crti.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to machar
-bash-3.00# file /opt/sunstudio12.1/prod/lib/crti.o
/opt/sunstudio12.1/prod/lib/crti.o: ELF 32-bit MSB relocatable SPARC Version 1
-bash-3.00#
Code:
x86_64 gcc:
bash-3.00# gcc -m64 -m128bit-long-double machar.c -o machar -lm
Undefined first referenced
symbol in file
finitel /var/tmp//ccQ07rek.o
ld: fatal: Symbol referencing errors. No output written to machar
collect2: ld returned 1 exit status
bash-3.00#
Code:
x86_64 cc:
bash-3.00# cc -64 machar.c -o machar -lm
cc: Warning: Option -64 passed to ld, if ld is invoked, ignored otherwise
"machar.c", line 106: warning: argument #2 is incompatible with prototype:
prototype: pointer to function(int) returning void : "/usr/include/iso/signal_iso.h", line 48
argument : pointer to void
"machar.c", line 168: warning: argument #2 is incompatible with prototype:
prototype: pointer to function(int) returning void : "/usr/include/iso/signal_iso.h", line 48
argument : pointer to void
"machar.c", line 417: warning: implicit function declaration: finite
"machar.c", line 648: warning: implicit function declaration: finitel
ld: fatal: file /opt/sunstudio12.1/prod/lib/crti.o: wrong ELF class: ELFCLASS32
ld: fatal: File processing errors. No output written to machar
bash-3.00#
I dont have time to debug anything today, but if you can fix the code or provide proper arguments for use on solaris, I would be happy to try again.