rts: Enable USDT probes object on Linux
authorBen Gamari <bgamari.foss@gmail.com>
Thu, 17 Aug 2017 14:28:39 +0000 (10:28 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 17 Aug 2017 20:42:55 +0000 (16:42 -0400)
Summary: The dtrace utility shipped with Debian expects this.

Reviewers: austin, simonmar

Reviewed By: simonmar

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3829

rts/ghc.mk

index 990f4db..e3de93d 100644 (file)
@@ -170,8 +170,12 @@ rts_$1_CMM_OBJS = $$(patsubst rts/%.cmm,rts/dist/build/%.$$($1_osuf),$$(rts_CMM_
 
 rts_$1_OBJS = $$(rts_$1_C_OBJS) $$(rts_$1_S_OBJS) $$(rts_$1_CMM_OBJS)
 
+ifneq "$$(findstring linux solaris2, $(TargetOS_CPP))" ""
+NEED_DTRACE_PROBES_OBJ = YES
+endif
+
 ifeq "$(USE_DTRACE)" "YES"
-ifeq "$(TargetOS_CPP)" "solaris2"
+ifeq "$(NEED_DTRACE_PROBES_OBJ)" "YES"
 # On Darwin we don't need to generate binary containing probes defined
 # in DTrace script, but DTrace on Solaris expects generation of binary
 # from the DTrace probes definitions