All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
@ 2016-10-26 15:35 Emil Velikov
  2016-10-26 16:18 ` [PATCH i-g-t v2] " Emil Velikov
  0 siblings, 1 reply; 5+ messages in thread
From: Emil Velikov @ 2016-10-26 15:35 UTC (permalink / raw)
  To: intel-gfx

From: Emil Velikov <emil.velikov@collabora.com>

Currently the latter is only set when using --enable-intel.

Whereas for the CFLAGS with "enable", it's set by PKG_CHECK_MODULES
and it's set locally for "disable". Yet, in either case it's not
propagated through, this one can get a range of build issues regardless of
the actual state of the toggle.

Cc: Brian Starkey <brian.starkey@arm.com>
Cc: Robert Foss <robert.foss@collabora.com>
Reported-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
---
If interested, one can do a fine grained addition in the respective
files, but this is the quickest fix ;-)

On a related note: seems like the nouveau and vc4 CFLAGS are _not_
propagated either. Any volunteers ?
---
 configure.ac | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/configure.ac b/configure.ac
index 735cfd5..1c747b3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,12 +178,15 @@ fi
 if test "x$INTEL" = xyes; then
 	PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64])
 	AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support])
-	DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
-	AC_SUBST([DRM_LIBS])
 else
 	DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/
-	AC_SUBST([DRM_INTEL_CFLAGS])
+	DRM_INTEL_LIBS=
 fi
+DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS"
+DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
+AC_SUBST([DRM_CFLAGS])
+AC_SUBST([DRM_LIBS])
+
 AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes])
 
 # for dma-buf tests
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH i-g-t v2] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
  2016-10-26 15:35 [PATCH i-g-t] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS} Emil Velikov
@ 2016-10-26 16:18 ` Emil Velikov
  2016-10-26 16:28   ` Robert Foss
                     ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Emil Velikov @ 2016-10-26 16:18 UTC (permalink / raw)
  To: intel-gfx

From: Emil Velikov <emil.velikov@collabora.com>

Currently the latter is only set when using --enable-intel.

Whereas for the CFLAGS: if we "enable" PKG_CHECK_MODULES sets the
variable, while for "disable" we do it locally. In either case the
CFLAGS is not propagated through, this one can get build issues
regardless of the actual state of the toggle.

v2: Add -I for the include directive and correctly propagate
$(top_srcdir).

Cc: Brian Starkey <brian.starkey@arm.com>
Cc: Robert Foss <robert.foss@collabora.com>
Reported-by: Brian Starkey <brian.starkey@arm.com>
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
---
This time fully tested:
 - enable/disable/auto with and w/o libdrm_intel :-)

Did not see much point in splitting the v2 only changes to 1/2 and keep
this as 2/2. I don't mind either way though :-)
---
 configure.ac | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/configure.ac b/configure.ac
index 735cfd5..e181c83 100644
--- a/configure.ac
+++ b/configure.ac
@@ -178,12 +178,15 @@ fi
 if test "x$INTEL" = xyes; then
 	PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64])
 	AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support])
-	DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
-	AC_SUBST([DRM_LIBS])
 else
-	DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/
-	AC_SUBST([DRM_INTEL_CFLAGS])
+	DRM_INTEL_CFLAGS=-I$\(top_srcdir\)/lib/stubs/drm/
+	DRM_INTEL_LIBS=
 fi
+DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS"
+DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
+AC_SUBST([DRM_CFLAGS])
+AC_SUBST([DRM_LIBS])
+
 AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes])
 
 # for dma-buf tests
-- 
2.9.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t v2] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
  2016-10-26 16:18 ` [PATCH i-g-t v2] " Emil Velikov
@ 2016-10-26 16:28   ` Robert Foss
  2016-10-26 18:07   ` Brian Starkey
  2016-11-09 14:33   ` Robert Foss
  2 siblings, 0 replies; 5+ messages in thread
From: Robert Foss @ 2016-10-26 16:28 UTC (permalink / raw)
  To: Emil Velikov, intel-gfx

Thanks Emil!
This looks good to me.

Signed-off-by: Robert Foss <robert.foss@collabora.com>

On 2016-10-26 12:18 PM, Emil Velikov wrote:
> From: Emil Velikov <emil.velikov@collabora.com>
>
> Currently the latter is only set when using --enable-intel.
>
> Whereas for the CFLAGS: if we "enable" PKG_CHECK_MODULES sets the
> variable, while for "disable" we do it locally. In either case the
> CFLAGS is not propagated through, this one can get build issues
> regardless of the actual state of the toggle.
>
> v2: Add -I for the include directive and correctly propagate
> $(top_srcdir).
>
> Cc: Brian Starkey <brian.starkey@arm.com>
> Cc: Robert Foss <robert.foss@collabora.com>
> Reported-by: Brian Starkey <brian.starkey@arm.com>
> Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
> ---
> This time fully tested:
>  - enable/disable/auto with and w/o libdrm_intel :-)
>
> Did not see much point in splitting the v2 only changes to 1/2 and keep
> this as 2/2. I don't mind either way though :-)
> ---
>  configure.ac | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/configure.ac b/configure.ac
> index 735cfd5..e181c83 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -178,12 +178,15 @@ fi
>  if test "x$INTEL" = xyes; then
>  	PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64])
>  	AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support])
> -	DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
> -	AC_SUBST([DRM_LIBS])
>  else
> -	DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/
> -	AC_SUBST([DRM_INTEL_CFLAGS])
> +	DRM_INTEL_CFLAGS=-I$\(top_srcdir\)/lib/stubs/drm/
> +	DRM_INTEL_LIBS=
>  fi
> +DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS"
> +DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
> +AC_SUBST([DRM_CFLAGS])
> +AC_SUBST([DRM_LIBS])
> +
>  AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes])
>
>  # for dma-buf tests
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t v2] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
  2016-10-26 16:18 ` [PATCH i-g-t v2] " Emil Velikov
  2016-10-26 16:28   ` Robert Foss
@ 2016-10-26 18:07   ` Brian Starkey
  2016-11-09 14:33   ` Robert Foss
  2 siblings, 0 replies; 5+ messages in thread
From: Brian Starkey @ 2016-10-26 18:07 UTC (permalink / raw)
  To: Emil Velikov; +Cc: intel-gfx

Hi Emil,

On Wed, Oct 26, 2016 at 05:18:47PM +0100, Emil Velikov wrote:
>From: Emil Velikov <emil.velikov@collabora.com>
>
>Currently the latter is only set when using --enable-intel.
>
>Whereas for the CFLAGS: if we "enable" PKG_CHECK_MODULES sets the
>variable, while for "disable" we do it locally. In either case the
>CFLAGS is not propagated through, this one can get build issues
>regardless of the actual state of the toggle.
>
>v2: Add -I for the include directive and correctly propagate
>$(top_srcdir).
>
>Cc: Brian Starkey <brian.starkey@arm.com>
>Cc: Robert Foss <robert.foss@collabora.com>
>Reported-by: Brian Starkey <brian.starkey@arm.com>
>Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
>---

This fixes my include path problem, so:

Tested-by: Brian Starkey <brian.starkey@arm.com>

Thanks very much for your help,
-Brian

>This time fully tested:
> - enable/disable/auto with and w/o libdrm_intel :-)
>
>Did not see much point in splitting the v2 only changes to 1/2 and keep
>this as 2/2. I don't mind either way though :-)
>---
> configure.ac | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
>diff --git a/configure.ac b/configure.ac
>index 735cfd5..e181c83 100644
>--- a/configure.ac
>+++ b/configure.ac
>@@ -178,12 +178,15 @@ fi
> if test "x$INTEL" = xyes; then
> 	PKG_CHECK_MODULES(DRM_INTEL, [libdrm_intel >= 2.4.64])
> 	AC_DEFINE(HAVE_LIBDRM_INTEL, 1, [Have intel support])
>-	DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
>-	AC_SUBST([DRM_LIBS])
> else
>-	DRM_INTEL_CFLAGS=$(top_srcdir)/lib/stubs/drm/
>-	AC_SUBST([DRM_INTEL_CFLAGS])
>+	DRM_INTEL_CFLAGS=-I$\(top_srcdir\)/lib/stubs/drm/
>+	DRM_INTEL_LIBS=
> fi
>+DRM_CFLAGS="$DRM_CFLAGS $DRM_INTEL_CFLAGS"
>+DRM_LIBS="$DRM_LIBS $DRM_INTEL_LIBS"
>+AC_SUBST([DRM_CFLAGS])
>+AC_SUBST([DRM_LIBS])
>+
> AM_CONDITIONAL(HAVE_LIBDRM_INTEL, [test "x$INTEL" = xyes])
>
> # for dma-buf tests
>-- 
>2.9.3
>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH i-g-t v2] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS}
  2016-10-26 16:18 ` [PATCH i-g-t v2] " Emil Velikov
  2016-10-26 16:28   ` Robert Foss
  2016-10-26 18:07   ` Brian Starkey
@ 2016-11-09 14:33   ` Robert Foss
  2 siblings, 0 replies; 5+ messages in thread
From: Robert Foss @ 2016-11-09 14:33 UTC (permalink / raw)
  To: Emil Velikov, intel-gfx

Reviewed-by: Robert Foss <robert.foss@collabora.com>
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-11-09 14:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-26 15:35 [PATCH i-g-t] configure.ac: correctly manage DRM_INTEL_{CFLAGS, LIBS} Emil Velikov
2016-10-26 16:18 ` [PATCH i-g-t v2] " Emil Velikov
2016-10-26 16:28   ` Robert Foss
2016-10-26 18:07   ` Brian Starkey
2016-11-09 14:33   ` Robert Foss

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.