This is the mail archive of the gcc-bugs@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]

[Bug testsuite/51059] FAIL: gcc.misc-tests/gcov-14.c (test for excess errors) on *-apple-darwin*


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51059

--- Comment #8 from Iain Sandoe <iains at gcc dot gnu.org> 2011-11-11 20:37:39 UTC ---
and ... to answer Nathan's question:

Darwin's weak works the way you expect -- however the symbol does have to be
present at link time.

So - one would construct a dylib:

foo.dylib:
extern __inline int Foo ();
__inline int Foo ()
{
  return 0; /* count(-) */
}

build that:
gcc ../tests/foo-dylib.c -dynamiclib  -o foo.dylib

link with it...

gcc ../tests/call-foo-main.c foo.dylib -o cf

then the dylib is removed .. 
rm foo.dylib

and ./cf behaves as you would expect (it refers to foo.dylib - but is happy for
it to be omitted).

... however, that's a bit long-winded for this case.


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