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] New: sdt.h is incompatible with clang


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

             Bug #: 13974
           Summary: sdt.h is incompatible with clang
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sourceware.org
        ReportedBy: jistone@redhat.com
    Classification: Unclassified


A simple sdt test with clang fails to build:

$ cat foosdt.c 
#include <sys/sdt.h>
void foo(void)
{
    STAP_PROBE(foo, foo);
}

$ clang -c foosdt.c 
foosdt.c:4:6: error: unknown flag
    STAP_PROBE(foo, foo);
    ^
In file included from foosdt.c:1:
/usr/local/include/sys/sdt.h:254:3: note: instantiated from:
  _SDT_PROBE(provider, name, 0, ())
  ^
/usr/local/include/sys/sdt.h:36:27: note: instantiated from:
    __asm__ __volatile__ (_SDT_ASM_BODY(provider, name, _SDT_ASM_ARGS, (n)) \
                          ^
/usr/local/include/sys/sdt.h:176:3: note: instantiated from:
  _SDT_ASM_3(           .pushsection .note.stapsdt,_SDT_ASM_AUTOGROUP,"note") \
  ^
/usr/local/include/sys/sdt.h:43:31: note: instantiated from:
# define _SDT_ASM_3(a, b, c)            _SDT_S(a) "," _SDT_S(b) "," \
                                        ^
<scratch space>:4:2: note: instantiated from:
".pushsection .note.stapsdt"
 ^
<inline asm>:2:31: note: instantiated into assembly here
.pushsection .note.stapsdt,"?","note"
                              ^
foosdt.c:4:6: error: .popsection without corresponding .pushsection
    STAP_PROBE(foo, foo);
    ^
In file included from foosdt.c:1:
/usr/local/include/sys/sdt.h:254:3: note: instantiated from:
  _SDT_PROBE(provider, name, 0, ())
  ^
/usr/local/include/sys/sdt.h:36:27: note: instantiated from:
    __asm__ __volatile__ (_SDT_ASM_BODY(provider, name, _SDT_ASM_ARGS, (n)) \
                          ^
/usr/local/include/sys/sdt.h:188:3: note: instantiated from:
  _SDT_ASM_1(           .popsection)
  ^
/usr/local/include/sys/sdt.h:41:26: note: instantiated from:
# define _SDT_ASM_1(x)                  _SDT_S(x) "\n"
                                        ^
<scratch space>:24:2: note: instantiated from:
".popsection"
 ^
<inline asm>:14:12: note: instantiated into assembly here
.popsection
           ^
foosdt.c:4:6: error: expected '@' or '%' before type
    STAP_PROBE(foo, foo);
    ^
In file included from foosdt.c:1:
/usr/local/include/sys/sdt.h:254:3: note: instantiated from:
  _SDT_PROBE(provider, name, 0, ())
  ^
/usr/local/include/sys/sdt.h:38:27: note: instantiated from:
    __asm__ __volatile__ (_SDT_ASM_BASE);                                   \
                          ^
/usr/local/include/sys/sdt.h:192:3: note: instantiated from:
  _SDT_ASM_5(           .pushsection .stapsdt.base,"aG","progbits",           \
  ^
/usr/local/include/sys/sdt.h:45:36: note: instantiated from:
# define _SDT_ASM_5(a, b, c, d, e)      _SDT_S(a) "," _SDT_S(b) "," \
                                        ^
<scratch space>:27:2: note: instantiated from:
".pushsection .stapsdt.base"
 ^
<inline asm>:2:33: note: instantiated into assembly here
.pushsection .stapsdt.base,"aG","progbits",.stapsdt.base,comdat
                                ^
foosdt.c:4:6: error: .popsection without corresponding .pushsection
    STAP_PROBE(foo, foo);
    ^
In file included from foosdt.c:1:
/usr/local/include/sys/sdt.h:254:3: note: instantiated from:
  _SDT_PROBE(provider, name, 0, ())
  ^
/usr/local/include/sys/sdt.h:38:27: note: instantiated from:
    __asm__ __volatile__ (_SDT_ASM_BASE);                                   \
                          ^
/usr/local/include/sys/sdt.h:198:3: note: instantiated from:
  _SDT_ASM_1(           .popsection)                                          \
  ^
/usr/local/include/sys/sdt.h:41:26: note: instantiated from:
# define _SDT_ASM_1(x)                  _SDT_S(x) "\n"
                                        ^
<scratch space>:37:2: note: instantiated from:
".popsection"
 ^
<inline asm>:7:12: note: instantiated into assembly here
.popsection
           ^
4 errors generated.

-- 
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]