public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug translator/13974] New: sdt.h is incompatible with clang
@ 2012-04-12 17:36 jistone at redhat dot com
  2012-04-12 17:45 ` [Bug translator/13974] " jistone at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: jistone at redhat dot com @ 2012-04-12 17:36 UTC (permalink / raw)
  To: systemtap

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.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-05-28 19:42 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-12 17:36 [Bug translator/13974] New: sdt.h is incompatible with clang jistone at redhat dot com
2012-04-12 17:45 ` [Bug translator/13974] " jistone at redhat dot com
2013-07-23  7:20 ` timo.lindfors at iki dot fi
2013-09-11 18:05 ` mjw at redhat dot com
2013-09-21  0:19 ` jistone at redhat dot com
2013-09-26 19:43 ` jistone at redhat dot com
2014-02-16 17:44 ` jackie.rosen at hushmail dot com
2014-02-17 19:04   ` Josh Stone
2014-05-28 19:42 ` schwab at sourceware dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).