summaryrefslogtreecommitdiffstats
path: root/buildrun.cxx
diff options
context:
space:
mode:
authorMark Wielaard <mjw@redhat.com>2009-07-14 00:30:55 +0200
committerMark Wielaard <mjw@redhat.com>2009-07-14 00:30:55 +0200
commitec6fdef5a46f450c8b7a52b491de6a17155101df (patch)
treed1e2c6ff95f381826f7f94e43a688c6a9951d6b0 /buildrun.cxx
parent4a4edc21a14792a4cc240b601912734027945ae8 (diff)
downloadsystemtap-steved-ec6fdef5a46f450c8b7a52b491de6a17155101df.tar.gz
systemtap-steved-ec6fdef5a46f450c8b7a52b491de6a17155101df.tar.xz
systemtap-steved-ec6fdef5a46f450c8b7a52b491de6a17155101df.zip
Make kernel opt-level the default again.
* main.cxx (main): Default gcc_flags to kernel opt-level (empty). * buildrun.cxx (compile_pass): Add -freorder-blocks back, document choices. * stap.1.in: Document new default opt-level. * testsuite/systemtap.base/cache.exp: Adjust for new caching results.
Diffstat (limited to 'buildrun.cxx')
-rw-r--r--buildrun.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/buildrun.cxx b/buildrun.cxx
index b54a0534..9cc9d98a 100644
--- a/buildrun.cxx
+++ b/buildrun.cxx
@@ -187,6 +187,12 @@ compile_pass (systemtap_session& s)
// if (s.keep_tmpdir)
// o << "CFLAGS += -fverbose-asm -save-temps" << endl;
+ // Kernels can be compiled with CONFIG_CC_OPTIMIZE_FOR_SIZE to select
+ // -Os, otherwise -O2 is the default.
+ o << "EXTRA_CFLAGS += -freorder-blocks" << endl; // improve on -Os
+
+ // Allow user to override default optimization when so requested.
+ // Last -OX wins.
o << "EXTRA_CFLAGS += " << s.gcc_flags << endl; // Add -O[0123s]
// o << "CFLAGS += -fno-unit-at-a-time" << endl;