summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorRichard Lowe <richlowe@richlowe.net>2011-12-05 05:09:07 +0000
committerRichard Lowe <richlowe@richlowe.net>2011-12-05 18:14:32 -0500
commit9d633eb43f03b96fb91fca87cfbeca3cc1276b80 (patch)
treede267752edd6a328931aa6a4486ad465791c6272 /usr/src
parent812d625152748eb7f55bc17854acdd49455c91b0 (diff)
downloadillumos-joyent-9d633eb43f03b96fb91fca87cfbeca3cc1276b80.tar.gz
dtest: Disable optimization of the compiled tests
GCC optimizes ever more enthusiastically: At version 4, even at -O2, it does so in ways that break these tests and that are increasingly difficult to prevent with code changes. Instead of increasing levels of trickery, just disable optimization. The specific problems we've had are: - pid/tst.args1 Notices that the arguments passed to go() are unused, and so doesn't actually pass them. - pid/tst.ret1, pid/tst.ret2 Notices that handle() calling go() is without side-effect, doesn't do it. - profile-n/tst.ufuncsort, java_api/tst.ProbeData, java_api/tst.FunctionLookup Notices that because fN is static, it doesn't need to use the normal i386 ABI and instead passes arg0 in %eax, rather than on the stack.
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/dtrace/test/tst/Makefile.com8
1 files changed, 6 insertions, 2 deletions
diff --git a/usr/src/cmd/dtrace/test/tst/Makefile.com b/usr/src/cmd/dtrace/test/tst/Makefile.com
index a23b8d65a8..e3cfd0ad0d 100644
--- a/usr/src/cmd/dtrace/test/tst/Makefile.com
+++ b/usr/src/cmd/dtrace/test/tst/Makefile.com
@@ -23,8 +23,6 @@
# Copyright 2008 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
-# ident "%Z%%M% %I% %E% SMI"
-#
include $(SRC)/cmd/Makefile.cmd
@@ -56,6 +54,12 @@ ROOT_EXES = $(EXES:%=$(TSTDIR)/%)
$(ROOT_TSTS) := FILEMODE = 0444
$(ROOT_EXES) := FILEMODE = 0555
+# The DTrace tests rely on "normal" behaviour from the compiler which
+# agressive optimization of small, simple, one compilation-unit programs may
+# utterly subvert. We force the compiler to not optimize rather than engage
+# in an arms race with increasingly belligerent optimizers.
+COPTFLAG= -xO0
+
all: $(EXES)
clean lint: