[Mesa-dev] [PATCH 1/2] Fix config check that claims to test if CXX supports -fvisibility=hidden option to actually test the C++ compiler.
Jon TURNEY
jon.turney at dronecode.org.uk
Tue Apr 26 11:29:14 PDT 2011
On 26/04/2011 17:45, tom fogal wrote:
> On 04/26/2011 06:00 AM, Jon TURNEY wrote:
>> Looking at this bit of autofoolery, I notice that at the moment it is just
>> checking if CC supports -fvisibility=hidden twice
>
> We use visibility=hidden for *both* C and C++ code, no?
>
> Is the issue that the Cygwin C compiler supports hidden visibility, and the
> C++ compiler does not?
There's nothing cygwin specific about this patch. That's why there is no
mention of cygwin in the title or content.
If you read configure.ac, you will see that it claims to test CC and CXX
independently to see if they support -fvisibility=hidden.
The second test is garbage as it does not instruct autoconf to use CXX for the
test.
I think if anyone actually tried to build mesa with a CC which supported
-fvisibility=hidden and CXX which didn't they would find this bug caused
-fvisibility=hidden to be supplied to CXX and their compilation to fail.
> If that's the case, can we have some sort of ifdef
> magic that automagically disables hidden visibility for the combination of C++
> and Cygwin?
>
> There's relatively little C++ in Mesa, compared to C (last I checked,
> admittedly not too recently). Turning off visibility when the C++ compiler
> doesn't support it seems like using a sledgehammer to pound in a nail.
More information about the mesa-dev
mailing list