After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 725902 - build: simplify dtrace configuration
build: simplify dtrace configuration
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-03-07 14:46 UTC by Allison Karlitskaya (desrt)
Modified: 2016-06-20 17:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: simplify dtrace configuration (2.92 KB, patch)
2014-03-07 14:46 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2014-03-07 14:46:37 UTC
RFC
Comment 1 Allison Karlitskaya (desrt) 2014-03-07 14:46:39 UTC
Created attachment 271240 [details] [review]
build: simplify dtrace configuration

The ability to pass libtool via $(CC) to dtrace and have it respect this
appears to be a feature that is only present in the systemtap version of
the tool.  In particular, FreeBSD (which seems to be using a copy of the
tool from Solaris) doesn't support this.

The result is that, with $(CC) ignored, and a .lo file specified in -o,
we get an ELF written to the .lo.

Instead of trying to have dtrace run libtool we can have libtool run
dtrace.  dtrace is really just a compiler that produces an object file
here, and it even understands -o, so libtool can make the appropriate
adjustments.

There appears to be some prior art for this approach.  A quick search
shows that at least QEMU is using this approach.  It also appears to
work on Linux with systemtap's dtrace and on FreeBSD.

This may regress cross-compilation because the dtrace command will have
no way of knowing which compiler we intend for it to use to produce the
object file.  I say "may" because I don't know if dtrace ever worked in
the first place under cross-compilation.
Comment 2 Allison Karlitskaya (desrt) 2014-03-07 14:53:09 UTC
Note that even with this patch, dtrace on FreeBSD is all kinds of broken.  It only works if the dtrace kernel modules are loaded (which they are not by default) and on 64bit builds you must pass -64 explicitly (due to a bug in dtrace, which I think is assuming the presence of a Solaris command that is not present on BSD).

We may want to replace our check for Mac OS (where we disable its dtrace for being broken for _different_ reasons) with one that actually tries to do a dtrace compile and disables dtrace if that doesn't work...
Comment 3 Dan Winship 2014-03-16 16:52:12 UTC
Comment on attachment 271240 [details] [review]
build: simplify dtrace configuration

yeah, makes sense
Comment 4 Philip Withnall 2016-06-16 16:31:37 UTC
Any reason this wasn't applied? It still applies, and still looks like a good (if incomplete) cleanup.
Comment 5 Matthias Clasen 2016-06-20 17:17:38 UTC
Attachment 271240 [details] pushed as 7563ab4 - build: simplify dtrace configuration