]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
FreeBSD: disable buggy -fstack-protector-all
authorRoman Bogorodskiy <bogorodskiy@gmail.com>
Wed, 15 May 2013 15:41:49 +0000 (19:41 +0400)
committerEric Blake <eblake@redhat.com>
Mon, 29 Jul 2013 21:58:34 +0000 (15:58 -0600)
FreeBSD ships an old gcc 4.2.1 which generates
bogus code, e.g. getsockopt() call returns
struct xucred with bogus values, which doesn't even
allow to connect to libvirtd:

error: Failed to find group record for gid '1284660778': No error: 0

So roll back to just -fstack-protector on FreeBSD.

(cherry picked from commit cc7cd6232ebfbf1a0e4edd51d9f5ca43a73eda10)

m4/virt-compile-warnings.m4

index e05491308c9b3254d2cfe01112e412bd2bfd3af1..3872310caaea4b88c339bf8367a2c648d8918195 100644 (file)
@@ -183,6 +183,13 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
        gl_WARN_ADD([-fstack-protector-all])
        gl_WARN_ADD([--param=ssp-buffer-size=4])
        ;;
+       *-*-freebsd*)
+       dnl FreeBSD ships old gcc 4.2.1 which doesn't handle
+       dnl -fstack-protector-all well
+       gl_WARN_ADD([-fstack-protector])
+
+       gl_WARN_ADD([-Wno-unused-command-line-argument])
+       ;;
     esac
     gl_WARN_ADD([-fexceptions])
     gl_WARN_ADD([-fasynchronous-unwind-tables])