summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorKJ Tsanaktsidis <[email protected]>2024-07-06 14:57:57 +1000
committerKJ Tsanaktsidis <[email protected]>2024-07-07 20:14:44 +1000
commit3381c60836ae499899179f454c6bb1dd3b0891ba (patch)
tree797c6345c0d07cacea71ef6cf7abb8b3c51447f1 /template
parentb940de83dee1932cef69cd249911aa8fe632df89 (diff)
Ensure CFLAGS are passed to probes.o generation
The dtrace python script from systemtap on Linux actually looks at the CFLAGS environment variable when invoking gcc to make the probes.o file. If we don't pass the CFLAGS we're using, this probes.o file can wind up without the required annotations indicating that it supports e.g. Intel CET. Fix this by explicitly exporting our build flags to the environment for this script. [Bug #18061]
Diffstat (limited to 'template')
-rw-r--r--template/Makefile.in5
1 files changed, 3 insertions, 2 deletions
diff --git a/template/Makefile.in b/template/Makefile.in
index 07605f6fdb..b7f3f10011 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -478,8 +478,9 @@ probes.stamp: $(DTRACE_REBUILD_OBJS)
probes.$(OBJEXT): $(srcdir)/probes.d $(DTRACE_REBUILD:yes=probes.stamp)
@$(ECHO) processing probes in object files
- $(Q) $(RM) $@
- $(Q) $(DTRACE) -G -C $(INCFLAGS) -s $(srcdir)/probes.d -o $@ $(DTRACE_REBUILD_OBJS)
+ @# n.b. the dtrace script looks at the $CFLAGS environment variable to decide
+ @# how to assemble probes.o; so we need to actually _export_ $(CFLAGS)
+ $(Q) CFLAGS="$(CFLAGS) $(XCFLAGS) $(CPPFLAGS)" $(DTRACE) -G -C $(INCFLAGS) -s $(srcdir)/probes.d -o $@ $(DTRACE_REBUILD_OBJS)
# DTrace static library hacks described here:
# https://marc.info/?l=opensolaris-dtrace-discuss&m=114761203110734&w=4