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

Federico Schwindt fgsch at lodoss.net
Mon Jan 20 12:13:22 CET 2014


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... ? Why are you disabling -Wextra in that case?

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?


On Thu, Jan 9, 2014 at 6:07 PM, Nils Goroll <slink at schokola.de> wrote:

> d9492da540430103b9dcd6844eb59b508c061d66 effectively breaks builds with
>> gcc 3.4.
> ... only when developer warnings are enabled.
> Patch attached.
> This also fixes linker issues if the compiler supports -fstack-protector
> but not the linker and a "the address of ‘buf’ will never be NULL" on
> Solaris / gcc 4.3.3
> Nils
> _______________________________________________
> varnish-dev mailing list
> varnish-dev at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-dev/attachments/20140120/298be811/attachment.html>

More information about the varnish-dev mailing list