]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Fix build with clang
authorJán Tomko <jtomko@redhat.com>
Thu, 4 Jul 2013 09:35:59 +0000 (11:35 +0200)
committerEric Blake <eblake@redhat.com>
Mon, 29 Jul 2013 21:59:21 +0000 (15:59 -0600)
Partially revert cdd703f's revert of c163410, as linking with clang
with --param=ssp-buffer-size=4 still fails with:
"argument unused during compilation".

(cherry picked from commit 4b91dc24d1ed6a5ec6d5d9ab0d8522375dd77f3a)

m4/virt-compile-warnings.m4

index 3872310caaea4b88c339bf8367a2c648d8918195..ce9f06cbca248863cd492a4d834153af5debdce1 100644 (file)
@@ -182,6 +182,13 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[
        dnl gl_WARN_ADD([-fstack-protector])
        gl_WARN_ADD([-fstack-protector-all])
        gl_WARN_ADD([--param=ssp-buffer-size=4])
+       dnl Even though it supports it, clang complains about
+       dnl use of --param=ssp-buffer-size=4 unless used with
+       dnl the -c arg. It doesn't like it when used with args
+       dnl that just link together .o files. Unfortunately
+       dnl we can't avoid that with automake, so we must turn
+       dnl off the following clang specific warning
+       gl_WARN_ADD([-Wno-unused-command-line-argument])
        ;;
        *-*-freebsd*)
        dnl FreeBSD ships old gcc 4.2.1 which doesn't handle