I've been using a couple of DejaGnu board files to test multilibs for which I don't have any way to execute tests, and for which I can't even link because I don't have compatible libraries. I'd like to share but don't know where to put them; any suggestions?
Janis
Index: dummy-link.exp =================================================================== --- dummy-link.exp (revision 0) +++ dummy-link.exp (revision 0) @@ -0,0 +1,63 @@ +######################################################################## +# +# File: dummy-link.exp +# Author: Janis Johnson <jani...@codesourcery.com> +# Date: 2013-02-25 +# +# Contents: +# +# DejaGNU board configuration file for a null target board and no +# libraries. +# +######################################################################## + +load_generic_config "sim" +set_board_info hostname "dummy-link" +set board_info(localhost,isremote) 0 +process_multilib_options "" + +# Override target_compile to downgrade link to compile and skip compile +# of multiple source files. +if { [info procs saved_target_compile] == [list] } { + rename target_compile saved_target_compile + proc target_compile { source destfile type options } { + if { $type == "executable" } { + set path_string "gcc/testsuite" + set i1 [string first $path_string $source] + set i2 [string last $path_string $source] + if { [regexp $path_string $options] + || $i1 != $i2 } { + global compiler_conditional_xfail_data + set compiler_conditional_xfail_data [list] + lappend compiler_conditional_xfail_data "unknown-*-*" + lappend compiler_conditional_xfail_data "*" + return "skip compile of multiple source files and expect it to fail" + } + set type "object" + regsub ".exe" $destfile ".o" destfile + send_user "target_compile: change executable to object\n" + } + return [saved_target_compile $source $destfile $type $options] + } +} + +# ${tool}_check_compile reports the status of the compile step, and the +# return value determines whether an execution step is run or is +# reported as unresolved. Let the real one report whether the compile +# passed or failed, but always treat the execution as unresolved. +if { [info procs saved_check_compile] == [list] } { + rename ${tool}_check_compile saved_check_compile + proc ${tool}_check_compile { testcase option objname gcc_output } { + set retval [saved_check_compile $testcase $option $objname $gcc_output] + return 0 + } +} + +# Override ${target}_load. Tests don't get this far, but it's needed +# for GCC effective-target checks that run executables. +foreach t $target_list { + proc ${t}_load { args } { + send_user "dummy load does nothing\n" + return [list "fail" "skip execution for dummy.exp"] + } +} Index: dummy-run.exp =================================================================== --- dummy-run.exp (revision 0) +++ dummy-run.exp (revision 0) @@ -0,0 +1,24 @@ +######################################################################## +# +# File: dummy-run.exp +# Author: Janis Johnson <jani...@codesourcery.com> +# Date: 2013-02-25 +# +# Contents: +# +# DejaGNU board configuration file for a null target board. +# +######################################################################## + +load_generic_config "sim" +set_board_info hostname "dummy-run" +set board_info(localhost,isremote) 0 +process_multilib_options "" + +# Override ${target}_load to do nothing. +foreach t $target_list { + proc ${t}_load { args } { + send_user "dummy load does nothing\n" + return [list "unresolved" ""] + } +}