Message ID | CAMe9rOpJjLDywo77qkAATQFf_5P-C4hLV3H_CY5Q-=DvD=bAKg@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 01/13/15 13:42, H.J. Lu wrote: > > since check_profiling_available result is cached. It is wrong to use the > cached result from -m32 for -m64. Here is the updated patch. Tested > with RUNTESTFLAGS="--target_board='unix{-m32,-m64}'. OK for > trunk? Yes, the updated patch is OK. jeff
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 0ac9646..61bff53 100644 --- a/gcc/testsuite/lib/target-supports.exp +++ b/gcc/testsuite/lib/target-supports.exp @@ -549,7 +549,16 @@ proc check_profiling_available { test_what } { } } - return $profiling_available_saved + # -pg link test result can't be cached since it may change between + # runs. + set profiling_working $profiling_available_saved + if { $profiling_available_saved == 1 + && ![check_no_compiler_messages_nocache profiling executable { + int main() { return 0; } } "-pg"] } { + set profiling_working 0 + } + + return $profiling_working } # Check to see if a target is "freestanding". This is as per the definition