The failure is because gcc is using --as-needed which discards libraries that are not needed - i.e. not referenced. Because of the order: -lv4v conftest.c it fails because the linker has not seen any references to v4v and tosses it before it gets to the conftest module.
The possible fixes are to remove --as-needed or get the gcc command line re-ordered. I am not sure what is laying out the gcc command line so I don't know how to do the latter. The following spells out the problem:
Marking this as an enhancement for now as we have a simple work around. This may be an autotools problem that is already fixed in OE after the daisy branch.
So for example, this happens:
Because there is a check like this in configure.in:
The failure is because gcc is using --as-needed which discards libraries that are not needed - i.e. not referenced. Because of the order: -lv4v conftest.c it fails because the linker has not seen any references to v4v and tosses it before it gets to the conftest module.
The possible fixes are to remove --as-needed or get the gcc command line re-ordered. I am not sure what is laying out the gcc command line so I don't know how to do the latter. The following spells out the problem:
https://wiki.ubuntu.com/NattyNarwhal/ToolchainTransition
And this one talks about it too:
http://sigquit.wordpress.com/2011/02/16/why-asneeded-doesnt-work-as-expected-for-your-libraries-on-your-autotools-project/