From ec6fdef5a46f450c8b7a52b491de6a17155101df Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 14 Jul 2009 00:30:55 +0200 Subject: 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. --- buildrun.cxx | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'buildrun.cxx') 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; -- cgit From 011165968c00e4125dfb9ee132e79f65dbea50c4 Mon Sep 17 00:00:00 2001 From: Mark Wielaard Date: Tue, 14 Jul 2009 11:47:46 +0200 Subject: Remove -O[0123s] gcc optimization flags for gcc pass 4 speedups again. We cannot guarantee that (un)optimized code compiles and/or generates fully functional code, so don't tempt the user to try it out. * session.h (struct systemtap_session): Remove gcc_flags string field. * hash.cxx (find_script_hash): Don't add gcc_flags. * main.cxx (usage): Remove -O[0123s] documentation. (main): Don't use gcc_flags. * buildrun.cxx (compile_pass): Don't add gcc_flags to EXTRA_CFLAGS. * stap1.in: Remove -O[0123s] documentation. * testsuite/systemtap.base/cache.exp: Remove tests for -O[0123s]. --- buildrun.cxx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'buildrun.cxx') diff --git a/buildrun.cxx b/buildrun.cxx index 9cc9d98a..7bcdcf8d 100644 --- a/buildrun.cxx +++ b/buildrun.cxx @@ -191,9 +191,12 @@ compile_pass (systemtap_session& s) // -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] + // We used to allow the user to override default optimization when so + // requested by adding a -O[0123s] so they could determine the + // time/space/speed tradeoffs themselves, but we cannot guantantee that + // the (un)optimized code actually compiles and/or generates functional + // code, so we had to remove it. + // o << "EXTRA_CFLAGS += " << s.gcc_flags << endl; // Add -O[0123s] // o << "CFLAGS += -fno-unit-at-a-time" << endl; -- cgit