Wireshark-commits: [Wireshark-commits] rev 43601: /trunk/ /trunk/: acinclude.m4 configure.in
Date: Sat, 07 Jul 2012 22:35:55 GMT
http://anonsvn.wireshark.org/viewvc/viewvc.cgi?view=rev&revision=43601

User: wmeier
Date: 2012/07/07 03:35 PM

Log:
 Use -D_FORTIFY_SOURCE=2 only if the gc optimization level is greater than 0.
 
 Fixes Bug #7449: https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7449
 
 -----
 Issue:
 
 Building Wireshark with '-O0 -D_FORTIFY_SOURCE=2 ...' fails
 
 The warning [error] message:
 
 /usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires
 compiling with optimization (-O) [-Werror=cpp]`
 
 
 A bit of research shows that this warning was added to a recent version of
 glibc (on at least Fedora).
 
  See: http://sourceware.org/bugzilla/show_bug.cgi?id=13979
 
 The warning message occurs if -D_FORTIFY_SOURCE=... is used and the gcc
 'optimization level' == 0 (-O0).
 
 Unfortunately when building with -O0 this warning message:
 
 1. Causes compiles to fail (if -Werror [stop  on warning])
 2. Causes ./configure to fail with an (incorrect) message
    about the pcap header being older than the libpcap version.

Directory: /trunk/
  Changes    Path            Action
  +46 -0     acinclude.m4    Modified
  +7 -5      configure.in    Modified