]> code.ossystems Code Review - openembedded-core.git/commitdiff
piglit: fix build failure with gold linker
authorMaxin B. John <maxin.john@intel.com>
Mon, 1 Aug 2016 15:34:49 +0000 (18:34 +0300)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 10 Aug 2016 08:35:57 +0000 (09:35 +0100)
When we use gold linker while DISTRO set to "nodistro", piglit build
fails with the following error:

| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to
'dlsym'
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to
'dlerror'
| ../../../../lib/libpiglitutil_gl.so.0: error: undefined reference to
'dlopen'
| collect2: error: ld returned 1 exit status

Fix it by providing '-ldl' to LDFLAGS.

[YOCTO #9851]

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-graphics/piglit/piglit_git.bb

index 811f7af73f38aad0ce1cdc2779473ac9a663c625..df90c4da02cd0fa91d49865e3e9ad3416eaf7576 100644 (file)
@@ -30,6 +30,8 @@ do_compile[dirs] =+ "${B}/temp/"
 PACKAGECONFIG ??= ""
 PACKAGECONFIG[freeglut] = "-DPIGLIT_USE_GLUT=1,-DPIGLIT_USE_GLUT=0,freeglut,"
 
+LDFLAGS_append = " ${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', '-ldl', '', d)}"
+
 do_configure_prepend() {
    if [ "${@bb.utils.contains('PACKAGECONFIG', 'freeglut', 'yes', 'no', d)}" = "no" ]; then
         sed -i -e "/^#.*include <GL\/freeglut_ext.h>$/d" ${S}/src/piglit/glut_wrap.h