Check if -pg links in check_profiling_available

* lib/target-supports.exp (check_profiling_available): Check if
	-pg links.

From-SVN: r219560
This commit is contained in:
H.J. Lu 2015-01-13 21:13:36 +00:00 committed by H.J. Lu
parent caee690e91
commit f263fe40d7
2 changed files with 15 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2015-01-13 H.J. Lu <hongjiu.lu@intel.com>
* lib/target-supports.exp (check_profiling_available): Check if
-pg links.
2015-01-13 Jan Hubicka <hubicka@ucw.cz>
PR ipa/64565

View File

@ -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