[prev in list] [next in list] [prev in thread] [next in thread]
List: openembedded-core
Subject: Re: [OE-core] [PATCH v2] virglrenderer: use gold linker for x86 if cflag -fvisibility=default set
From: Richard Purdie <richard.purdie () linuxfoundation ! org>
Date: 2019-04-30 14:46:35
Message-ID: 9686ed6db87337e7f1a6c8ab72555f5d2ebadd02.camel () linuxfoundation ! org
[Download RAW message or body]
On Tue, 2019-04-30 at 10:23 -0400, kai.kang@windriver.com wrote:
> From: Kai Kang <kai.kang@windriver.com>
>
> When gcc compile options '-fvisibility=default' is set in CFLAGS, it
> fails to compile virglrenderer for x86:
>
> > i586-wrs-linux-libtool: link: i586-wrs-linux-gcc -m32 -march=i586 ...
> -Wl,--whole-archive ./.libs/libvrend.a
> gallium/auxiliary/.libs/libgallium.a -Wl,--no-whole-archive ...
> -Wl,-Bsymbolic -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
> -fstack-protector-strong -Wl,-z -Wl,relro -Wl,-z -Wl,now -pthread
> -Wl,-soname -Wl,libvirglrenderer.so.0 -o .libs/libvirglrenderer.so.0.2.0
> > ld: gallium/auxiliary/.libs/libgallium.a(u_cpu_detect.o): relocation
> R_386_GOTOFF against undefined symbol `util_cpu_caps' can not be used
> when making a shared object
> > ld: final link failed: bad value
> > collect2: error: ld returned 1 exit status
>
> It seems GNU bfd linker doesn't work well to handle option '-Bsymbolic'
> and gcc option '-fvisibility=default'. Use gold instead under this
> circumstance.
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
> meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb \
> b/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb index \
> 225a0b8b0c..f72cfbd9b4 100644
> --- a/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb
> +++ b/meta/recipes-graphics/virglrenderer/virglrenderer_0.7.0.bb
> @@ -15,6 +15,8 @@ S = "${WORKDIR}/git"
>
> inherit autotools pkgconfig distro_features_check
>
> +EXTRA_OEMAKE_x86 = "${@bb.utils.contains('CFLAGS', '-fvisibility=default', \
> 'GM_LDFLAGS+=-fuse-ld=gold', '', d)}" +
> BBCLASSEXTEND = "native nativesdk"
>
> REQUIRED_DISTRO_FEATURES = "opengl"
Do we really want to start adding hacks to recipes to work around
linker bugs like this?
Has the bug been reported upstream? Why doesn't this happen on non-x86?
Cheers,
Richard
--
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic