Hi,<br><br>I am new to LLVM and clang and I would like to seek some professional help. :)<br><br>I have been trying to compile some C code on a linux x86 computer for a Sparc machine.<br><br>I used:<br><br> clang -ccc-host-triple sparc-unknown-linux -ccc-clang-archs sparc -pthreads -lm -emit-llvm test.c -c -o -test.bc<br>
<br>The following error messages are produced:<br><br>/usr/include/pthread.h:665:6: error: 'regparm' is not valid on this platform<br> __cleanup_fct_attribute;<br> ^~~~~~~~~~~~~~~~~~~~~~~<br>In file included from TEST.C:46:<br>
In file included from /usr/include/stdlib.h:320:<br>In file included from /usr/include/sys/types.h:271:<br>/usr/include/bits/pthreadtypes.h:222:50: note: instantiated from:<br># define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))<br>
^ ~<br>In file included from TEST.C:65:<br>/usr/include/pthread.h:677:3: error: 'regparm' is not valid on this platform<br> __cleanup_fct_attribute;<br>
^~~~~~~~~~~~~~~~~~~~~~~<br>In file included from TEST.C:46:<br>In file included from /usr/include/stdlib.h:320:<br>In file included from /usr/include/sys/types.h:271:<br>/usr/include/bits/pthreadtypes.h:222:50: note: instantiated from:<br>
# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))<br> ^ ~<br>In file included from TEST.C:65:<br>/usr/include/pthread.h:718:6: error: 'regparm' is not valid on this platform<br>
__cleanup_fct_attribute __attribute__ ((__noreturn__))<br> ^~~~~~~~~~~~~~~~~~~~~~~<br><br>What causes the errors and how can I fix it? <br><br>Thanks a lot and have a nice weekend!<br><br>Best,<br>Christine<br>