This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] PR debug/42487, xfail scan-assembler on DW_AT_ranges in gcc.dg/debug/dwarf2/aranges-fnsec-1.c for darwin



On 17 Aug 2010, at 16:58, Richard Henderson wrote:


On 08/17/2010 08:48 AM, Jack Howarth wrote:
Aren't the targets which don't support function sections also
those that set TARGET_ASM_FUNCTION_RODATA_SECTION to default_no_function_rodata_section?

They should be the ones for which targetm.have_named_sections is false. Er, which is now universally true, says grep. We don't support any a.out targets anymore?

I really have no idea, apparently.

Also, I noticed that we are currently passing some of the other - function-sections tests
on darwin...

Iain explained this one -- .subsections_via_symbols allows many of the -function-sections type tests to succeed. So, I'm really not sure how to proceed. Mark?


like this....?
Iain

Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp	(revision 163308)
+++ gcc/testsuite/lib/target-supports.exp	(working copy)
@@ -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
# code, 0 otherwise.


Index: gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c
===================================================================
--- gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c (revision 163308)
+++ gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c (working copy)
@@ -2,6 +2,7 @@
text section if nothing went in there. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
+/* { dg-require-effective-target function_sections } */
/* { dg-options "-gdwarf-2 -ffunction-sections -w -dA" } */
/* { dg-final { scan-assembler-not "\\.Letext0-\\.Ltext0" } } */
/* { dg-final { scan-assembler-not "\\.Ltext0\[^\n\r\]*Offset 0x0" } } */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]