public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
From: "jistone at redhat dot com" <sourceware-bugzilla@sourceware.org>
To: systemtap@sourceware.org
Subject: [Bug translator/13974] New: sdt.h is incompatible with clang
Date: Thu, 12 Apr 2012 17:36:00 -0000	[thread overview]
Message-ID: <bug-13974-6586@http.sourceware.org/bugzilla/> (raw)

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.

             reply	other threads:[~2012-04-12 17:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-12 17:36 jistone at redhat dot com [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-13974-6586@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=systemtap@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).