Patchwork [testsuite/darwin] fix PR testsuite/51059

login
register
mail settings
Submitter IainS
Date Nov. 11, 2011, 8:26 p.m.
Message ID <5C7640DD-1BEF-4877-AAB8-44279750FAB0@sandoe-acoustics.co.uk>
Download mbox | patch
Permalink /patch/125288/
State New
Headers show

Comments

IainS - Nov. 11, 2011, 8:26 p.m.
This probably qualifies as obvious - but having discussed some of the  
background with Mike ..
.. there are other ways of solving the problem - although probably  
rather heavy-weight for this problem.

.. So, I'll let him have the say...

OK for trunk?
Iain

testsuite:

	PR testsuite/51059
	* gcc.misc-tests/gcov-14.c (dg-options): Force flat namespace for
	Darwin targets and allow the Foo symbol to be undefined.
Mike Stump - Nov. 11, 2011, 9:06 p.m.
On Nov 11, 2011, at 12:26 PM, Iain Sandoe wrote:
> This probably qualifies as obvious - but having discussed some of the background with Mike ..
> .. there are other ways of solving the problem - although probably rather heavy-weight for this problem.
> 
> .. So, I'll let him have the say...
> 
> OK for trunk?

Ok.  The other way to do this would be to split requires-weak into two, and have darwin return false for one and true for the other and then make this use the second form.  Please add a comment, like, darwin doesn't have elf weak import, or some such.  The idea being, when darwin gets it, then, we could remove the line.  Also, this help people have a slight clue, why such options are necessary.
Rainer Orth - Nov. 14, 2011, 9:50 a.m.
Iain,

> This probably qualifies as obvious - but having discussed some of the
> background with Mike ..
> .. there are other ways of solving the problem - although probably rather
> heavy-weight for this problem.
>
> .. So, I'll let him have the say...
>
> OK for trunk?
> Iain
>
> testsuite:
>
> 	PR testsuite/51059
> 	* gcc.misc-tests/gcov-14.c (dg-options): Force flat namespace for
> 	Darwin targets and allow the Foo symbol to be undefined.
>
> Index: gcc/testsuite/gcc.misc-tests/gcov-14.c
> ===================================================================
> --- gcc/testsuite/gcc.misc-tests/gcov-14.c	(revision 181293)
> +++ gcc/testsuite/gcc.misc-tests/gcov-14.c	(working copy)
> @@ -1,6 +1,7 @@
>  /* Test gcov extern inline.  */
>
>  /* { dg-options "-O2 -fprofile-arcs -ftest-coverage" } */
> +/* { dg-options "-O2 -fprofile-arcs -ftest-coverage  -flat_namespace -
> undefined suppress" { target *-*-darwin* }  } */
>  /* { dg-require-weak "" } */

I'd prefer if you'd use the new dg-additional-options instead of
duplicating the complete set of default options.

Thanks.
        Rainer

Patch

Index: gcc/testsuite/gcc.misc-tests/gcov-14.c
===================================================================
--- gcc/testsuite/gcc.misc-tests/gcov-14.c	(revision 181293)
+++ gcc/testsuite/gcc.misc-tests/gcov-14.c	(working copy)
@@ -1,6 +1,7 @@ 
  /* Test gcov extern inline.  */

  /* { dg-options "-O2 -fprofile-arcs -ftest-coverage" } */
+/* { dg-options "-O2 -fprofile-arcs -ftest-coverage  -flat_namespace - 
undefined suppress" { target *-*-darwin* }  } */
  /* { dg-require-weak "" } */
  /* { dg-do run { target native } } */