[Mesa-dev] [PATCH] XXXgallium/common_dri: fix the scons build
Eric Anholt
eric at anholt.net
Mon Sep 30 09:06:24 PDT 2013
Emil Velikov <emil.l.velikov at gmail.com> writes:
> On 28/09/13 01:41, Eric Anholt wrote:
>> Emil Velikov <emil.l.velikov at gmail.com> writes:
>>
>>> * clone the drienv to driswenv and adjust approapriately
>>> * export driswenv and use it in dri-swrast
>>> * ensure __NOT_HAVE_DRM_H is defined for drisw, similar
>>> to all other common_drisw users
>>
>> I'm confused where __NOT_HAVE_DRM_H comes from. I don't see any
>> references to it in the tree until your patch.
>>
> Yes that one did my head in a bit, here is what I've gathered
>
> If you decide to omit it, build will fail due to missing drm.h in the
> include path, coming from dri_interface.h.
>
> Take a look at dri_interface.h, it has a very interesting heuristics -
> #if def __APPLE__ || __CYGWIN__ || __GNU__
> #ifndef __NOT_HAVE_DRM_H
> #define __NOT_HAVE_DRM_H
> #endif
>
> Thus the obvious question, why did it work before and not after - I'm
> assuming that scons plays "nicely" with the __GNU__ define.
>
> The last one is only speculation as I've ran out of patience at that
> moment :\ Although the following info wrt __NOT_HAVE_DRM_H is quite
> interesting.
>
> Three out of four automake swrast providers define it
> * src/mesa/drivers/dri/swrast/Makefile.am
> * src/gallium/targets/dri-swrast/Makefile.am
> * src/gallium/state_trackers/dri/sw/Makefile.am (swrast libGL.so)
>
> and only one Scons target provides is
> * src/gallium/state_trackers/dri/sw/SConscript
> env.Append(CPPDEFINES = [('__NOT_HAVE_DRM_H', '1')])
>
> Note #ifdef __NOT_HAVE_DRM_H vs #if __NOT_HAVE_DRM_H
Not sure what I did before to fail at grep, but yeah, it's obviously in
the tree. I've squashed your patch into mine -- sound good?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 835 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20130930/b38627da/attachment.pgp>
More information about the mesa-dev
mailing list