[Mesa-dev] [PATCH] r600: include libelf headers only as needed
Jan Vesely
jan.vesely at rutgers.edu
Sat Jun 17 11:45:23 UTC 2017
On Sat, 2017-06-17 at 11:43 +0100, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> 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.
>
> Cc: Jan Vesely <jan.vesely at rutgers.edu>
> Cc: Mauro Rossi <issor.oruam at gmail.com>
> Reported-by: Mauro Rossi <issor.oruam at gmail.com>
> Fixes: d96a210842 ("r600g,compute: provide local copy of functions from
> ac_binary.c")
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
Assuming it fixes Mauro's problem, LGTM.
Reviewed-by: Jan Vesely <jan.vesely at rutgers.edu>
Jan
> ---
> 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 37cfed4497b..6e87539cfe7 100644
> --- a/src/gallium/drivers/r600/evergreen_compute.c
> +++ b/src/gallium/drivers/r600/evergreen_compute.c
> @@ -24,8 +24,10 @@
> * Adam Rak <adam.rak at streamnovation.com>
> */
>
> +#ifdef HAVE_OPENCL
> #include <gelf.h>
> #include <libelf.h>
> +#endif
> #include <stdio.h>
> #include <errno.h>
> #include "pipe/p_defines.h"
--
Jan Vesely <jan.vesely at rutgers.edu>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170617/fa47624b/attachment.sig>
More information about the mesa-dev
mailing list