Commit 257f5167 by Iain Sandoe

re PR debug/42487 (FAIL: gcc.dg/debug/dwarf2/aranges-fnsec-1.c scan-assembler DW_AT_ranges)


	PR debug/42487
	* lib/target-supports.exp
	(check_effective_target_function_sections): New.
	* gcc.dg/debug/dwarf2/aranges-fnsec-1.c: Check that the target supports
	function sections before proceding.

From-SVN: r163326
parent 566ea2d1
2010-08-18 Iain Sandoe <iains@gcc.gnu.org>
PR debug/42487
* lib/target-supports.exp
(check_effective_target_function_sections): New.
* gcc.dg/debug/dwarf2/aranges-fnsec-1.c: Check that the target supports
function sections before proceding.
2010-08-17 Jakub Jelinek <jakub@redhat.com> 2010-08-17 Jakub Jelinek <jakub@redhat.com>
PR fortran/45308 PR fortran/45308
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
text section if nothing went in there. */ text section if nothing went in there. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */ /* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */ /* { dg-do compile } */
/* { dg-require-effective-target function_sections } */
/* { dg-options "-gdwarf-2 -ffunction-sections -w -dA" } */ /* { dg-options "-gdwarf-2 -ffunction-sections -w -dA" } */
/* { dg-final { scan-assembler-not "\\.Letext0-\\.Ltext0" } } */ /* { dg-final { scan-assembler-not "\\.Letext0-\\.Ltext0" } } */
/* { dg-final { scan-assembler-not "\\.Ltext0\[^\n\r\]*Offset 0x0" } } */ /* { dg-final { scan-assembler-not "\\.Ltext0\[^\n\r\]*Offset 0x0" } } */
......
...@@ -623,6 +623,20 @@ proc check_effective_target_tls_runtime {} { ...@@ -623,6 +623,20 @@ proc check_effective_target_tls_runtime {} {
}] }]
} }
# Return 1 if -ffunction-sections is supported, 0 otherwise.
proc check_effective_target_function_sections {} {
# Darwin has its own scheme and silently accepts -ffunction-sections.
global target_triplet
if { [regexp ".*-.*-darwin.*" $target_triplet] } {
return 0
}
return [check_no_compiler_messages functionsections assembly {
void foo (void) { }
} "-ffunction-sections"]
}
# Return 1 if compilation with -fgraphite is error-free for trivial # Return 1 if compilation with -fgraphite is error-free for trivial
# code, 0 otherwise. # code, 0 otherwise.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment