Re: [libvirt PATCH 2/4] m4: enable -fstack-protector-strong on mingw

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

 



On 7/22/20 1:21 PM, Daniel P. Berrangé wrote:
Historically we avoided -fstack-protector* since it resulted in a broken
build on Mingw. In GCC 10 in Fedora though, we have the opposite problem,
getting a broken build if we don't enable one of the -fstack-protector*
options. This also works in GCC 9, so we don't need to worry about the
old brokeness which evidentally got fixed at some time without noticing.


...and I guess there's no "super old" mingw releases that we need to worry about, since it's always the mingw on the current release of Fedora that's used (did I get that right?)


Reviewed-by: Laine Stump <laine@xxxxxxxxxx>



Signed-off-by: Daniel P. Berrangé <berrange@xxxxxxxxxx>
---
  m4/virt-compile-warnings.m4 | 4 +---
  1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4
index d3538d59f8..d171d09991 100644
--- a/m4/virt-compile-warnings.m4
+++ b/m4/virt-compile-warnings.m4
@@ -169,13 +169,11 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
      gl_WARN_ADD([-Wframe-larger-than=262144], [RELAXED_FRAME_LIMIT_CFLAGS])
# Extra special flags
-    dnl -fstack-protector stuff passes gl_WARN_ADD with gcc
-    dnl on Mingw32, but fails when actually used
      case $host in
         aarch64-*-*)
         dnl "error: -fstack-protector not supported for this target [-Werror]"
         ;;
-       *-*-linux*)
+       *-*-linux* | *-*-mingw*)
         dnl Prefer -fstack-protector-strong if it's available.
         dnl There doesn't seem to be great overhead in adding
         dnl -fstack-protector-all instead of -fstack-protector.





[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]

  Powered by Linux