[PATCH] build: improve FORTIFY_SOURCE usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Based on this coreutils bug report, since coreutils copied what
libvirt had done:
https://lists.gnu.org/archive/html/bug-coreutils/2012-10/msg00121.html

* m4/virt-compile-warnings.m4 (LIBVIRT_COMPILE_WARNINGS): Allow
for user to pre-define _FORTIFY_SOURCE.
---

Pushing under the build-breaker rule.

 m4/virt-compile-warnings.m4 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index f1b8f39..4a0f289 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -150,7 +150,7 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
     AH_VERBATIM([FORTIFY_SOURCE],
     [/* Enable compile-time and run-time bounds-checking, and some warnings,
         without upsetting newer glibc. */
-     #if defined __OPTIMIZE__ && __OPTIMIZE__
+     #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
      # define _FORTIFY_SOURCE 2
      #endif
     ])
-- 
1.7.11.7

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]