From nobody Sat Apr 27 20:16:36 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1491397730541665.6272789509051; Wed, 5 Apr 2017 06:08:50 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6A094C059754; Wed, 5 Apr 2017 13:08:48 +0000 (UTC) Received: from colo-mx.corp.redhat.com (unknown [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AA63491BBB; Wed, 5 Apr 2017 13:08:47 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id C4C055ED64; Wed, 5 Apr 2017 13:08:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v35D7C5T028606 for ; Wed, 5 Apr 2017 09:07:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id C3CD877E56; Wed, 5 Apr 2017 13:07:12 +0000 (UTC) Received: from icr.brq.redhat.com (dhcp129-58.brq.redhat.com [10.34.129.58]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4CB087A317 for ; Wed, 5 Apr 2017 13:07:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 6A094C059754 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 6A094C059754 From: =?UTF-8?q?J=C3=A1n=20Tomko?= To: libvir-list@redhat.com Date: Wed, 5 Apr 2017 15:04:39 +0200 Message-Id: <32de0d929167761d4fbeaa22b9cb93c3f40bf538.1491397371.git.jtomko@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCHv2] Split out -Wframe-larger-than warning from WARN_CLFAGS X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 05 Apr 2017 13:08:49 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Introduce STRICT_FRAME_LIMIT_CFLAGS that will be used for the library code and RELAXED_FRAME_LIMIT_CFLAGS for daemon code and the test code. Raising the limit for tests allows building them with clang with optimizations disabled. --- v2: * use the strict limit for tools and daemon too * append the limit to WARN_CFLAGS once per Makefile daemon/Makefile.am | 2 ++ m4/virt-compile-warnings.m4 | 4 ++-- src/Makefile.am | 2 ++ tests/Makefile.am | 2 ++ tools/Makefile.am | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 60c7368..d02ab33 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am @@ -31,6 +31,8 @@ INCLUDES =3D \ =20 CLEANFILES =3D =20 +WARN_CFLAGS +=3D $(STRICT_FRAME_LIMIT_CFLAGS) + DAEMON_GENERATED =3D \ remote_dispatch.h \ lxc_dispatch.h \ diff --git a/m4/virt-compile-warnings.m4 b/m4/virt-compile-warnings.m4 index 17fdf9d..768a5c8 100644 --- a/m4/virt-compile-warnings.m4 +++ b/m4/virt-compile-warnings.m4 @@ -169,8 +169,8 @@ AC_DEFUN([LIBVIRT_COMPILE_WARNINGS],[ # This should be < 256 really. Currently we're down to 4096, # but using 1024 bytes sized buffers (mostly for virStrerror) # stops us from going down further - wantwarn=3D"$wantwarn -Wframe-larger-than=3D4096" - dnl wantwarn=3D"$wantwarn -Wframe-larger-than=3D256" + gl_WARN_ADD(["-Wframe-larger-than=3D4096"], [STRICT_FRAME_LIMIT_CFLAGS= ]) + gl_WARN_ADD(["-Wframe-larger-than=3D25600"], [RELAXED_FRAME_LIMIT_CFLA= GS]) =20 # Extra special flags dnl -fstack-protector stuff passes gl_WARN_ADD with gcc diff --git a/src/Makefile.am b/src/Makefile.am index 75e4344..3c7adae 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -37,6 +37,8 @@ INCLUDES =3D -I../gnulib/lib \ -Dabs_topsrcdir=3D"\"$(abs_topsrcdir)\"" \ $(GETTEXT_CPPFLAGS) =20 +WARN_CFLAGS +=3D $(STRICT_FRAME_LIMIT_CFLAGS) + AM_CFLAGS =3D $(LIBXML_CFLAGS) \ $(WARN_CFLAGS) \ $(LOCK_CHECKING_CFLAGS) \ diff --git a/tests/Makefile.am b/tests/Makefile.am index aa9d2eb..279e9b7 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -33,6 +33,8 @@ INCLUDES =3D \ -I$(top_srcdir)/src/conf \ $(GETTEXT_CPPFLAGS) =20 +WARN_CFLAGS +=3D $(RELAXED_FRAME_LIMIT_CFLAGS) + AM_CFLAGS =3D \ -Dabs_builddir=3D"\"$(abs_builddir)\"" \ -Dabs_topbuilddir=3D"\"$(abs_topbuilddir)\"" \ diff --git a/tools/Makefile.am b/tools/Makefile.am index 162d8e5..bfacaf2 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -23,6 +23,8 @@ INCLUDES =3D \ -I$(top_srcdir) \ $(GETTEXT_CPPFLAGS) =20 +WARN_CFLAGS +=3D $(STRICT_FRAME_LIMIT_CFLAGS) + AM_LDFLAGS =3D \ $(RELRO_LDFLAGS) \ $(NO_INDIRECT_LDFLAGS) \ --=20 2.10.2 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list