On 14-02-12 06:24 PM, Keith Packard wrote:
> So, we could simply add
>
> #ifndef _FORTIFY_SOURCE
> #define _FORTIFY_SOURCE 2
> #endif
>
> to some X server header file, or you could do something fancier with the
> configure macros. I'm easy, but I definitely want it somehow :-)
How about this for a start. If it works fine we can apply it to all
modules through util-macros where we can be a little fancier if need be,
like taking care of non GNU compilers.
diff --git a/configure.ac b/configure.ac
index 21a6591..66dd24f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -85,7 +85,7 @@ XORG_PROG_RAWCPP
# Quoted so that make will expand $(CWARNFLAGS) in makefiles to allow
# easier overrides at build time.
-XSERVER_CFLAGS='$(CWARNFLAGS)'
+XSERVER_CFLAGS='$(CWARNFLAGS) -D_FORTIFY_SOURCE=2'
dnl Explicitly add -fno-strict-aliasing since this option should
disappear
dnl from util-macros CWARNFLAGS
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel