[LLVMdev] help with an error message using clang ?
Christine Cheng
clcheng at stanford.edu
Fri Sep 16 16:40:11 PDT 2011
Hi,
I am new to LLVM and clang and I would like to seek some professional help.
:)
I have been trying to compile some C code on a linux x86 computer for a
Sparc machine.
I used:
clang -ccc-host-triple sparc-unknown-linux -ccc-clang-archs sparc -pthreads
-lm -emit-llvm test.c -c -o -test.bc
The following error messages are produced:
/usr/include/pthread.h:665:6: error: 'regparm' is not valid on this platform
__cleanup_fct_attribute;
^~~~~~~~~~~~~~~~~~~~~~~
In file included from TEST.C:46:
In file included from /usr/include/stdlib.h:320:
In file included from /usr/include/sys/types.h:271:
/usr/include/bits/pthreadtypes.h:222:50: note: instantiated from:
# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
^ ~
In file included from TEST.C:65:
/usr/include/pthread.h:677:3: error: 'regparm' is not valid on this platform
__cleanup_fct_attribute;
^~~~~~~~~~~~~~~~~~~~~~~
In file included from TEST.C:46:
In file included from /usr/include/stdlib.h:320:
In file included from /usr/include/sys/types.h:271:
/usr/include/bits/pthreadtypes.h:222:50: note: instantiated from:
# define __cleanup_fct_attribute __attribute__ ((__regparm__ (1)))
^ ~
In file included from TEST.C:65:
/usr/include/pthread.h:718:6: error: 'regparm' is not valid on this platform
__cleanup_fct_attribute __attribute__ ((__noreturn__))
^~~~~~~~~~~~~~~~~~~~~~~
What causes the errors and how can I fix it?
Thanks a lot and have a nice weekend!
Best,
Christine
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110916/ed23fc74/attachment.html>
More information about the llvm-dev
mailing list