public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line
@ 2017-01-18 22:03 630dr7+9vgtozzjuj0gg at sharklasers dot com
  2017-01-18 22:03 ` [Bug runtime/21063] " 630dr7+9vgtozzjuj0gg at sharklasers dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: 630dr7+9vgtozzjuj0gg at sharklasers dot com @ 2017-01-18 22:03 UTC (permalink / raw)
  To: systemtap

https://sourceware.org/bugzilla/show_bug.cgi?id=21063

            Bug ID: 21063
           Summary: dtrace script causes mysterious build failures due to
                    improper forming of gcc command line
           Product: systemtap
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: runtime
          Assignee: systemtap at sourceware dot org
          Reporter: 630dr7+9vgtozzjuj0gg at sharklasers dot com
  Target Milestone: ---

From https://bugzilla.redhat.com/show_bug.cgi?id=1413762

When users provide a CFLAGS envar which containts newlines, the dtrace script
fails with:

gcc: error: 
   : No such file or directory

For example, the fedora rpm spec file for creating packages defines:

CFLAGS="-O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64
-mtune=generic -g \
               -D_LARGEFILE_SOURCE \
               -D_FILE_OFFSET_BITS=64 \
               -DZLIB_CONST \
               -fno-delete-null-pointer-checks"

and the multiple lines cause the dtrace script to die. Possibly, this error has
caused packagers to believe systemtap USDT's have not been available in project
where in fact it has been, because using "--with-dtrace" caused compilation
errors which were taken as due to general unavailability of the real dtrace
tool on linux.

The problem is towards the end of the `dtrace script`:

        cmd=split(cc1) + defines + includes + split(cflags) +\
             ["-fPIC", "-I.", "-I/usr/include", "-c", fname, "-o",
              filename + suffix]

where cflags should be sanitized so that examples like the above CFLAGS are
tolerated.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

end of thread, other threads:[~2017-01-22 22:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-18 22:03 [Bug runtime/21063] New: dtrace script causes mysterious build failures due to improper forming of gcc command line 630dr7+9vgtozzjuj0gg at sharklasers dot com
2017-01-18 22:03 ` [Bug runtime/21063] " 630dr7+9vgtozzjuj0gg at sharklasers dot com
2017-01-21  7:33 ` fche at redhat dot com
2017-01-21 22:36 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com
2017-01-21 23:00 ` fche at redhat dot com
2017-01-22 22:22 ` 630dr7+9vgtozzjuj0gg at sharklasers dot com

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).