[oe] [PATCH 1/5] fltk: add -fPIC to compile flags

Andre McCurdy armccurdy at gmail.com
Thu Dec 14 21:31:39 UTC 2017


On Thu, Dec 14, 2017 at 2:09 AM, Andreas Müller <schnitzeltony at gmail.com> wrote:
> Building yoshimi failes otherwise with many errors as:
> | error: <sysroot>/usr/lib/libfltk.a(Fl_File_Browser.cxx.o): requires unsupported dynamic reloc R_ARM_THM_MOVW_ABS_NC; recompile with -fPIC

>From that error it looks more like a bug in whatever is trying to link
a static library (libfltk.a) into something which expects to be
linking with a shared library.

If so, then forcing the fltk static libs to be PIC is just a
workaround rather than a real fix.

> Signed-off-by: Andreas Müller <schnitzeltony at gmail.com>
> ---
>  meta-oe/recipes-support/fltk/fltk.bb | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/meta-oe/recipes-support/fltk/fltk.bb b/meta-oe/recipes-support/fltk/fltk.bb
> index 542fd66..be76062 100644
> --- a/meta-oe/recipes-support/fltk/fltk.bb
> +++ b/meta-oe/recipes-support/fltk/fltk.bb
> @@ -14,6 +14,10 @@ EXTRA_OECMAKE = " \
>
>  PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'opengl', d)}"
>
> +# for sake of other packages linking against fltk libs
> +CFLAGS += "-fPIC"
> +CXXFLAGS += "-fPIC"
> +
>  PACKAGECONFIG[examples] = "-DOPTION_BUILD_EXAMPLES=ON,-DOPTION_BUILD_EXAMPLES=OFF,"
>  PACKAGECONFIG[opengl] = "-DOPTION_USE_GL=ON,-DOPTION_USE_GL=OFF,virtual/libgl"
>  PACKAGECONFIG[xinerama] = "-DOPTION_USE_XINERAMA=ON,-DOPTION_USE_XINERAMA=OFF,libxinerama"
> --
> 2.9.5
>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel



More information about the Openembedded-devel mailing list