[Mesa-dev] [PATCH 2/2] Android: move libdrm settings to top-level Android.common.mk

Emil Velikov emil.l.velikov at gmail.com
Thu Jun 9 23:22:39 UTC 2016


Hi Rob,

On 8 June 2016 at 00:27, Rob Herring <robh at kernel.org> wrote:
> Fix warnings like these due to HAVE_LIBDRM being inconsistently defined:
>
> external/libdrm/include/drm/drm.h:839:30: warning: redefinition of typedef 'drm_clip_rect_t' is a C11 feature [-Wtypedef-redefinition]
> typedef struct drm_clip_rect drm_clip_rect_t;
>
> HAVE_LIBDRM needs to be set project wide to fix this. This change also
> harmlessly links libdrm with everything, but simplifies the makefiles a
> bit.
>
> Signed-off-by: Rob Herring <robh at kernel.org>
> ---
>  Android.common.mk                            | 6 ++++++
>  src/egl/Android.mk                           | 6 ------
>  src/gallium/auxiliary/pipe-loader/Android.mk | 3 ---
>  src/gallium/drivers/freedreno/Android.mk     | 2 +-
>  src/gallium/drivers/nouveau/Android.mk       | 2 +-
>  src/gallium/drivers/r300/Android.mk          | 2 +-
>  src/gallium/drivers/r600/Android.mk          | 2 +-
>  src/gallium/drivers/radeon/Android.mk        | 2 +-
>  src/gallium/drivers/radeonsi/Android.mk      | 2 +-
>  src/gallium/drivers/vc4/Android.mk           | 1 -
>  src/gallium/drivers/virgl/Android.mk         | 1 -
>  src/gallium/state_trackers/dri/Android.mk    | 1 -
>  src/gallium/targets/dri/Android.mk           | 5 -----
>  src/gallium/winsys/amdgpu/drm/Android.mk     | 2 +-
>  src/gallium/winsys/freedreno/drm/Android.mk  | 2 +-
>  src/gallium/winsys/i915/drm/Android.mk       | 2 +-
>  src/gallium/winsys/intel/drm/Android.mk      | 2 +-
>  src/gallium/winsys/nouveau/drm/Android.mk    | 2 +-
>  src/gallium/winsys/radeon/drm/Android.mk     | 2 +-
>  src/gallium/winsys/svga/drm/Android.mk       | 1 -
>  src/gallium/winsys/vc4/drm/Android.mk        | 1 -
>  src/gallium/winsys/virgl/drm/Android.mk      | 1 -
>  src/gbm/Android.mk                           | 1 -
>  src/loader/Android.mk                        | 5 -----
>  src/mesa/drivers/dri/Android.mk              | 1 -
>  25 files changed, 18 insertions(+), 39 deletions(-)
>
> diff --git a/Android.common.mk b/Android.common.mk
> index 831cbe5..dee22da 100644
> --- a/Android.common.mk
> +++ b/Android.common.mk
> @@ -82,6 +82,12 @@ LOCAL_CFLAGS += \
>         -D__STDC_LIMIT_MACROS
>  endif
>
> +# add libdrm if there are hardware drivers
> +ifneq ($(filter-out swrast,$(MESA_GPU_DRIVERS)),)
> +LOCAL_CFLAGS += -DHAVE_LIBDRM
> +LOCAL_SHARED_LIBRARIES += libdrm
Personally I would have kept the libdrm as-is because it's somewhat
symmetrical with autotools build.

It feels like extra bikeshedding on my end, so unless someone else
objects, I'll just pull the patches as-is some time tomorrow.

Thanks
Emil
P.S. With those in the log looks a hell lot better - 9k vs 0.5k warnings


More information about the mesa-dev mailing list