This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug testsuite/51059] FAIL: gcc.misc-tests/gcov-14.c (test for excess errors) on *-apple-darwin*
- From: "iains at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 11 Nov 2011 20:37:39 +0000
- Subject: [Bug testsuite/51059] FAIL: gcc.misc-tests/gcov-14.c (test for excess errors) on *-apple-darwin*
- Auto-submitted: auto-generated
- References: <bug-51059-4@http.gcc.gnu.org/bugzilla/>
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.