Module: Mesa
Branch: master
Commit: 68aa39d5c2fed23736f07136390e61e1740e4d6f
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=68aa39d5c2fed23736f07136390e61e1740e4d6f

Author: Emil Velikov <[email protected]>
Date:   Sat Jun 17 11:40:21 2017 +0100

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 <[email protected]>
Reported-by: Mauro Rossi <[email protected]>
Tested-by: Mauro Rossi <[email protected]>
Signed-off-by: Emil Velikov <[email protected]>

---

 src/gallium/drivers/r600/evergreen_compute.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/r600/evergreen_compute.c 
b/src/gallium/drivers/r600/evergreen_compute.c
index 37cfed4497..6e87539cfe 100644
--- a/src/gallium/drivers/r600/evergreen_compute.c
+++ b/src/gallium/drivers/r600/evergreen_compute.c
@@ -24,8 +24,10 @@
  *      Adam Rak <[email protected]>
  */
 
+#ifdef HAVE_OPENCL
 #include <gelf.h>
 #include <libelf.h>
+#endif
 #include <stdio.h>
 #include <errno.h>
 #include "pipe/p_defines.h"

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to