From: H.J. Lu Date: Tue, 13 Jan 2015 21:13:36 +0000 (+0000) Subject: Check if -pg links in check_profiling_available X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f263fe40d780740a780e8c273fc336da48fd963e;p=gcc.git Check if -pg links in check_profiling_available * lib/target-supports.exp (check_profiling_available): Check if -pg links. From-SVN: r219560 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index a0163c3875f..5e58e7d1675 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-01-13 H.J. Lu + + * lib/target-supports.exp (check_profiling_available): Check if + -pg links. + 2015-01-13 Jan Hubicka PR ipa/64565 diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp index 0ac96466d4b..61bff53754b 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