This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug translator/13974] sdt.h is incompatible with clang


http://sourceware.org/bugzilla/show_bug.cgi?id=13974

--- Comment #1 from Josh Stone <jistone at redhat dot com> 2012-04-12 17:44:50 UTC ---
(In reply to comment #0)
> foosdt.c:4:6: error: unknown flag
[...]
> <inline asm>:2:31: note: instantiated into assembly here
> .pushsection .note.stapsdt,"?","note"
>                               ^

This error is due to our compiler-dependent test for sdt-config.h:

> /* includes/sys/sdt-config.h.  Generated from sdt-config.h.in by configure.
> 
>    This file just defines _SDT_ASM_SECTION_AUTOGROUP_SUPPORT to 0 or 1 to
>    indicate whether the assembler supports "?" in .pushsection directives.  */
>
> #define _SDT_ASM_SECTION_AUTOGROUP_SUPPORT 1

My installed header was created for gcc, which does support this flag, but
clearly clang does not.  I'm not sure how we could deal with multiple system
compilers in general.  Perhaps we'd have to add #ifdef to sdt-config.h to match
the compiler which was tested, and assume 0 if encountering something else?

With sdt-config.h configured directly with clang, there's a different error at
the same place, and the rest of the errors are still the same.

> foosdt.c:4:6: error: expected '@' or '%' before type
[...]
> <inline asm>:2:31: note: instantiated into assembly here
> .pushsection .note.stapsdt,"","note"
>                               ^

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]