[PATCH] fix build with --enable-developer-warnings and gcc3.4

Nils Goroll slink at schokola.de
Mon Jan 20 19:37:09 CET 2014

Hi Federico,

On 01/20/14 12:13 PM, Federico Schwindt wrote:

> I was looking at your diff I don't understand the
> -Wno-missing-field-initializers vs -Wno-extra. If the compiler doesn't support
> the former why add the -Wno-extra instead of just not adding -Wno-missing... ?

Hm, your question seems to contain the answer ;)
If the compiler does not support -Wno-missing-field-initializers, we can't use 
-Wno-missing-field-initializers, so we have to use -Wno-extra

> The linker check seems wrong to me. The config.log output for this part is:
> configure:16930: checking whether C compiler accepts -fstack-protector
> configure:16949: gcc -std=gnu99 -c -g -O2 -pthread -Wall -Werror
> -Wno-error=unused-result  -fstack-protector  conftest.c >&5
> configure:16949: $? = 0
> configure:16957: result: yes
> configure:16960: checking whether the linker accepts -fstack-protector
> configure:16979: gcc -std=gnu99 -o conftest -g -O2 -pthread -Wall -Werror
> -Wno-error=unused-result    -fstack-protector conftest.c >&5
> configure:16979: $? = 0
> configure:16988: result: yes
> So both checks are doing the same. Can you share the config.log?

Notice that gcc is invoked with -c for the first and -o for the second case. 
It's no surprise to me that the second test only fails on an exotic OS (read: 
OpenSolaris) :P

Cheers, Nils

More information about the varnish-dev mailing list