[Mesa-dev] [PATCH] configure: simplify visibility compiler flag detection

Emil Velikov emil.l.velikov at gmail.com
Sun Mar 1 10:57:52 PST 2015


On 01/03/15 18:30, Matt Turner wrote:
> On Sun, Mar 1, 2015 at 6:09 AM, Marc Dietrich <marvin24 at gmx.de> wrote:
>> This patch simplifies the visibility compiler flag detection in configure and
>> makes it more generic to also support compilers other than gcc.
> 
> This simplification relies on the assumption that compilers support
> -fvisibility=... if and only if they support
> attribute(visibility("...")).
> 
Hmm you're correct. I've naively assumed they both go hand in hand.

> I guess that might be the case, but the logic doesn't seem very sound.
> 
> Is the 'if test "x$GCC" = xyes; then' test actually rejecting clang?
> It doesn't seem so, since above there's a 'if test "x$GCC" = xyes -a
> "x$acv_mesa_CLANG" = xno; then'
> 
> So, I guess it looks to me like we already support visibility
> detection for !gcc.
> 
The HAVE_FUNC_ATTRIBUTE_VISIBILITY define should already be there,
regardless of the compiler. On the -fvisibility... side we handle it for
GCC and compatible (i.e. clang) compilers.

-Emil


More information about the mesa-dev mailing list