r600: include libelf headers only as needed
authorEmil Velikov <emil.velikov@collabora.com>
Sat, 17 Jun 2017 10:40:21 +0000 (11:40 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Sat, 17 Jun 2017 15:57:18 +0000 (16:57 +0100)
commit68aa39d5c2fed23736f07136390e61e1740e4d6f
treea98d3c1ee43599bf5ce344aee4459071c404a7cf
parent1f958c1337290b4062a77f79fc101bb9f4bdf515
r600: include libelf headers only as needed

Headers are required only when building with OpenCL. As we're building
w/o it libelf may be missing, hence we'll error out as below:

src/gallium/drivers/r600/evergreen_compute.c:27:10:
fatal error: 'gelf.h' file not found
         ^
1 error generated.

Fixes: d96a210842 ("r600g,compute: provide local copy of functions from
ac_binary.c")
Reviewed-by: Jan Vesely <jan.vesely@rutgers.edu>
Reported-by: Mauro Rossi <issor.oruam@gmail.com>
Tested-by: Mauro Rossi <issor.oruam@gmail.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
src/gallium/drivers/r600/evergreen_compute.c