piglit: fix build failure with gold linker

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]

(From OE-Core rev: 79005ff905f8c82a8766af5a927b9a0f8929e24f)

Signed-off-by: Maxin B. John <maxin.john@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Maxin B. John 2016-08-01 18:34:49 +03:00 committed by Richard Purdie
parent 3e97d194f8
commit 3b064be9b1
1 changed files with 2 additions and 0 deletions

View 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