[Mesa-dev] [PATCH mesa/mesa] Check for dladdr(), rather than assuming we have it if we have RTLD_DEFAULT

Emil Velikov emil.l.velikov at gmail.com
Sat Apr 19 14:01:24 PDT 2014


On 17/04/14 11:41, Jon TURNEY wrote:
> On 09/04/2014 14:53, Jonathan Gray wrote:
>> On Sun, Apr 06, 2014 at 03:30:43PM +0100, Jon TURNEY wrote:
>>> Unfortunately, Cygwin defines RTLD_DEFAULT (for glibc compatibility), but can't
>>> provide dladdr(), so add a check for dladdr()
>>>
>>> ---
>>>  configure.ac                                  | 6 ++++++
>>>  src/mesa/drivers/dri/common/megadriver_stub.c | 7 +++----
>>>  2 files changed, 9 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/configure.ac b/configure.ac
>>> index 878b24a..bbbed79 100644
>>> --- a/configure.ac
>>> +++ b/configure.ac
>>> @@ -480,6 +480,12 @@ AC_CHECK_FUNC([dlopen], [DEFINES="$DEFINES -DHAVE_DLOPEN"],
>>>         [DEFINES="$DEFINES -DHAVE_DLOPEN"; DLOPEN_LIBS="-ldl"])])
>>>  AC_SUBST([DLOPEN_LIBS])
>>>  
>>> +dnl Check if that library also has dladdr
>>> +SAVE_LDFLAGS="$LDFLAGS"
>>
>> The case here is wrong and won't work as intended unless changed to save_LDFLAGS.
> 
> Good catch.
> 
>> Otherwise the patch seems fine, though it will break the scons build till
>> those files are updated?
> 
> Updated patch attached with what I think are the appropriate scons runes added
> (and sent to the right mailing list this time! :-) ).
> 
Scons seems to have analogous function to AC_CHECK_FUNCS -> CheckFunc. Never
used it + not sure if it's worth the extra code considering the use base of
scons users.

As I doubt that anyone else will review this patch, it might be worth pushing
it and working out the issues (if any) as they arise. Planning to do this in
the middle of the week.

-Emil

> 
> 
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
> 



More information about the mesa-dev mailing list