diff options
author | Alex J Lennon <ajlennon@dynamicdevices.co.uk> | 2014-06-02 11:45:13 +0100 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.ro> | 2014-06-10 21:20:15 +0300 |
commit | e7fdcad1fa7da2654c1cfbf10719def7b851e7cd (patch) | |
tree | 22f643ed118201aed9ee8335779834773306bb61 | |
parent | f3a8693f08f99893453fd1fe282515b2f222c080 (diff) | |
download | meta-raspberrypi-e7fdcad1fa7da2654c1cfbf10719def7b851e7cd.tar.gz |
userland: Add '--no-as-needed' linker flag
This is done to ensure all specified shared libraries are linked against
applications (e.g. raspivid)i.
libmmal_vc_client.so makes use of __attribute__(constructor) to ensure
that supplier components (e.g. camera) are loaded when the static library is
loaded.
raspivid, and possibly other applications, link against libmmal_vc_client.so,
causing the ctor to execute, but there is no needed dependency.
Some build environments (e.g. Yocto/OpenEmbedded) pass the '--no-as-needed'
linker flag which removes the dependency on libmmal_vc_client and thus
components are not registered.
In this situation raspivid then gives an error of the form
root@raspberrypi:~# raspivid -o test
mmal: mmal_component_create_core: could not find component 'vc.ril.camera'
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Failed to run camera app. Please check for firmware updates
For further details see:
https://lists.yoctoproject.org/pipermail/yocto/2014-June/019933.html
Change-Id: I9d787fd83379e8b6428dde3827395c8b96be1f7f
Signed-off-by: Alex J Lennon <ajlennon@dynamicdevices.co.uk>
Acked-by: Andrei Gherzan <andrei@gherzan.ro>
-rw-r--r-- | recipes-graphics/userland/userland_git.bb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/recipes-graphics/userland/userland_git.bb b/recipes-graphics/userland/userland_git.bb index a348090..4b405ee 100644 --- a/recipes-graphics/userland/userland_git.bb +++ b/recipes-graphics/userland/userland_git.bb | |||
@@ -18,7 +18,7 @@ S = "${WORKDIR}/git" | |||
18 | 18 | ||
19 | inherit cmake | 19 | inherit cmake |
20 | 20 | ||
21 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release" | 21 | EXTRA_OECMAKE = "-DCMAKE_BUILD_TYPE=Release -DCMAKE_EXE_LINKER_FLAGS='-Wl,--no-as-needed'" |
22 | 22 | ||
23 | # The compiled binaries don't provide sonames. | 23 | # The compiled binaries don't provide sonames. |
24 | SOLIBS = "${SOLIBSDEV}" | 24 | SOLIBS = "${SOLIBSDEV}" |