Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/share/mk add DTRACE_OPTS and HOST_DTRACE_OPTS to allow disab...
details: https://anonhg.NetBSD.org/src/rev/c52b44cc3d96
branches: trunk
changeset: 359793:c52b44cc3d96
user: chs <chs%NetBSD.org@localhost>
date: Sun Feb 25 18:53:23 2018 +0000
description:
add DTRACE_OPTS and HOST_DTRACE_OPTS to allow disabling various optimizations
that interfere with using dtrace. use them when MKDTRACE=yes.
diffstat:
share/mk/bsd.host.mk | 11 ++++++++---
share/mk/sys.mk | 9 ++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
diffs (60 lines):
diff -r 41edcc76c7c6 -r c52b44cc3d96 share/mk/bsd.host.mk
--- a/share/mk/bsd.host.mk Sun Feb 25 18:51:18 2018 +0000
+++ b/share/mk/bsd.host.mk Sun Feb 25 18:53:23 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.host.mk,v 1.3 2016/02/20 15:18:46 christos Exp $
+# $NetBSD: bsd.host.mk,v 1.4 2018/02/25 18:53:23 chs Exp $
.if !defined(_BSD_HOST_MK_)
_BSD_HOST_MK_=1
@@ -9,11 +9,16 @@
HOST_DBG?= -O
.endif
+.if ${MKDTRACE:Uno} != "no"
+# disable compiler options that interfere with dtrace
+HOST_DTRACE_OPTS?= -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-ipa-sra
+.endif
+
# Helpers for cross-compiling
HOST_CC?= cc
HOST_CFLAGS?= ${HOST_DBG}
-HOST_COMPILE.c?=${HOST_CC} ${HOST_CFLAGS} ${HOST_CPPFLAGS} -c
-HOST_COMPILE.cc?= ${HOST_CXX} ${HOST_CXXFLAGS} ${HOST_CPPFLAGS} -c
+HOST_COMPILE.c?=${HOST_CC} ${HOST_CFLAGS} ${HOST_DTRACE_OPTS} ${HOST_CPPFLAGS} -c
+HOST_COMPILE.cc?= ${HOST_CXX} ${HOST_CXXFLAGS} ${HOST_DTRACE_OPTS} ${HOST_CPPFLAGS} -c
HOST_LINK.cc?= ${HOST_CXX} ${HOST_CXXFLAGS} ${HOST_CPPFLAGS} ${HOST_LDFLAGS}
.if defined(HOSTPROG_CXX)
HOST_LINK.c?= ${HOST_LINK.cc}
diff -r 41edcc76c7c6 -r c52b44cc3d96 share/mk/sys.mk
--- a/share/mk/sys.mk Sun Feb 25 18:51:18 2018 +0000
+++ b/share/mk/sys.mk Sun Feb 25 18:53:23 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: sys.mk,v 1.129 2016/03/30 17:35:43 martin Exp $
+# $NetBSD: sys.mk,v 1.130 2018/02/25 18:53:23 chs Exp $
# @(#)sys.mk 8.2 (Berkeley) 3/21/94
#
# This file contains the basic rules for make(1) and is read first
@@ -37,9 +37,12 @@
.else
DBG?= -O2
.endif
+.if ${MKDTRACE:Uno} != "no"
+DTRACE_OPTS?= -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-ipa-sra -fno-ipa-icf
+.endif
CFLAGS?= ${DBG}
LDFLAGS?=
-COMPILE.c?= ${CC} ${CFLAGS} ${CPPFLAGS} -c
+COMPILE.c?= ${CC} ${CFLAGS} ${DTRACE_OPTS} ${CPPFLAGS} -c
LINK.c?= ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}
# C Type Format data is required for DTrace
@@ -55,7 +58,7 @@
__BUILDSEED= ${BUILDSEED}/${__ALLSRC3:O}/${.TARGET}
_CXXSEED?= ${BUILDSEED:D-frandom-seed=${__BUILDSEED:hash}}
-COMPILE.cc?= ${CXX} ${_CXXSEED} ${CXXFLAGS} ${CPPFLAGS} -c
+COMPILE.cc?= ${CXX} ${_CXXSEED} ${CXXFLAGS} ${DTRACE_OPTS} ${CPPFLAGS} -c
LINK.cc?= ${CXX} ${CXXFLAGS} ${CPPFLAGS} ${LDFLAGS}
OBJC?= ${CC}
Home |
Main Index |
Thread Index |
Old Index