Eo: Mark all Eo APIs as weak
authorJean-Philippe Andre <jp.andre@samsung.com>
Thu, 31 Mar 2016 05:02:49 +0000 (14:02 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Fri, 1 Apr 2016 03:09:06 +0000 (12:09 +0900)
commita1a506e13e276d8ef6e522ae9659cd4289485015
tree64b5c80d61a204d9b5b557ed1feac88b6c1ddadc
parentf10672dd7429dd98dd3b7d88d9c3c63aac392a40
Eo: Mark all Eo APIs as weak

This marks all EOAPI functions with GCC weak attribute.
This allows two things:
- replace functions
- link at runtime and check if functions exist

The purpose of this patch is to exploit these two features
of weak symbols. The first goal is to allow applications
to build binaries against later versions and run on earlier
versions of EFL without any run-time link error. Those errors
simply prevent applications to even start if they were using
any function that's not present in the old version of EFL.

Now all that needs to be done on the application side is to
do either of:
- if (efl_version > xx) { call_weak_symbol() }
- if (call_weak_symbol) { call_weak_symbol() }

In the future, we can also imagine providing a compatibility
library that would replace EFL's internal APIs with a newer
version. This would let apps use new EFLs on platforms that
don't update fast enough.

I am now pushing this patch as an experiment to see what breaks,
but I expect no problem.

@feature
src/lib/eo/Eo.h