summaryrefslogtreecommitdiff
path: root/gcc/testsuite/lib/g++.exp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/lib/g++.exp')
-rw-r--r--gcc/testsuite/lib/g++.exp31
1 files changed, 31 insertions, 0 deletions
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index 81c4398a4e1..9e269b12d66 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -307,3 +307,34 @@ proc g++_target_compile { source dest type options } {
return $result
}
+
+#
+# ${tool}_option_help
+#
+# Changed "additional" to "extra" because runtest.exp treats --a* as --all.
+#
+# This shouldn't be necessary at all; it should be entirely redundant with
+# --tool_opts, except that --tool_opts currently breaks multilib: see
+# http://lists.gnu.org/archive/html/dejagnu/2002-10/msg00007.html
+
+proc ${tool}_option_help { } {
+ send_user " --extra_opts,OPTIONS\t\tUse OPTIONS to compile the testcase files. OPTIONS should be comma-separated.\n"
+}
+
+#
+# ${tool}_option_proc
+#
+
+proc ${tool}_option_proc { option } {
+ if [regexp "^--extra_opts," $option] {
+ global gpp_compile_options
+ regsub "^--extra_opts," $option "" option
+ foreach x [split $option ","] {
+ lappend gpp_compile_options "additional_flags=$x"
+ }
+ verbose -log "gpp_compile_options set to $gpp_compile_options"
+ return 1
+ } else {
+ return 0
+ }
+}