This is a proposed change to the multi-sim.exp baseboard to make it more useful when testing installed cross compilers. I wanted to use the contrib/test_installed script that comes with GCC to test an installed cross compiler using a simulator but ran into two problems. The first was that test_installed did not allow me to set a target different then the host I was running on. I have submittted a patch to GCC to allow me to do this (http://gcc.gnu.org/ml/gcc-patches/2014-03/msg00301.html). The other issue is that when multi-sim was running the compiler to find the dynamic linker and rpaths it was running the system GCC instead of the GCC I wanted to test. My fix for that was to check the GCC_UNDER_TEST in this baseboard. I am not sure if this is the right way to do this, no other baseboard in dejagnu checks for GCC_UNDER_TEST but if there is a way to set things up in the test_installed script so I don't have to use GCC_UNDER_TEST I was not able to find it.
So is an acceptable patch or is there a better way to find the compiler I want to use? Steve Ellcey sell...@mips.com 2014-04-14 Steve Ellcey <sell...@mips.com> * baseboards/multi-sim.exp (dynamic_linker_flag): Check GCC_UNDER_TEST. * baseboards/multi-sim.exp (rpath_flags): Ditto. diff --git a/baseboards/multi-sim.exp b/baseboards/multi-sim.exp index f725c6c..ef1f2f9 100644 --- a/baseboards/multi-sim.exp +++ b/baseboards/multi-sim.exp @@ -42,7 +42,12 @@ load_base_board_description "basic-sim" proc dynamic_linker_flag { args } { global board - set compiler "[board_info $board compiler]" + global GCC_UNDER_TEST + if [info exists GCC_UNDER_TEST] then { + set compiler $GCC_UNDER_TEST + } else { + set compiler "[board_info $board compiler]" + } set mflags "[board_info $board multilib_flags]" set result [remote_exec host "$compiler $mflags --print-sysroot"] set output [lindex $result 1] @@ -54,7 +59,12 @@ proc dynamic_linker_flag { args } { } proc rpath_flags { args } { global board - set compiler "[board_info $board compiler]" + global GCC_UNDER_TEST + if [info exists GCC_UNDER_TEST] then { + set compiler $GCC_UNDER_TEST + } else { + set compiler "[board_info $board compiler]" + } set mflags "[board_info $board multilib_flags] [libgloss_include_flags] [newlib_include_flags] [libgloss_link_flags] [libgloss_link_flags]" set rpathflags "" set gccpath [get_multilibs] _______________________________________________ DejaGnu mailing list DejaGnu@gnu.org https://lists.gnu.org/mailman/listinfo/dejagnu