After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 678014 - build: allow building with newer glibc-headers and -O0
build: allow building with newer glibc-headers and -O0
Status: RESOLVED FIXED
Product: gtk-vnc
Classification: Other
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-vnc-maint
gtk-vnc-maint
Depends on:
Blocks:
 
 
Reported: 2012-06-13 12:50 UTC by Christophe Fergeau
Modified: 2012-06-21 14:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: allow building with newer glibc-headers and -O0 (2.06 KB, patch)
2012-06-13 12:50 UTC, Christophe Fergeau
none Details | Review

Description Christophe Fergeau 2012-06-13 12:50:41 UTC
Commit log and autoconf snippet written by Eric Blake for libvirt.

glibc 2.15 (on Fedora 17) coupled with explicit disabling of
optimization during development dies a painful death:

In file included from /usr/include/limits.h:27:0,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/limits.h:169,.
                 from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/syslimits.h:7,
                 from /usr/lib/gcc/x86_64-redhat-linux/4.7.0/include/limits.h:34,
                 from util/bitmap.c:26:
/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires compiling with optimization (-O) [-Werror=cpp]
cc1: all warnings being treated as errors

Work around this by only conditionally defining _FORTIFY_SOURCE,
in the case where glibc can actually use it.  The trick is using
AH_VERBATIM instead of AC_DEFINE.

* m4/gtk-vnc-warnings.m4 (LIBOSINFO_COMPILE_WARNINGS): Squelch
_FORTIFY_SOURCE when needed to avoid glibc #warnings.
Comment 1 Christophe Fergeau 2012-06-13 12:50:43 UTC
Created attachment 216270 [details] [review]
build: allow building with newer glibc-headers and -O0
Comment 2 Daniel P. Berrange 2012-06-21 14:50:11 UTC
Thanks for the patch, merged in GIT master

commit 2bba4f41800ba4b5583af9a897fde30d47061396
Author: Christophe Fergeau <cfergeau@redhat.com>
Date:   Wed Jun 13 14:48:19 2012 +0200

    build: allow building with newer glibc-headers and -O0