From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Leonard Subject: [PATCH ARM v7 13/13] mini-os: fixed compiling with debug=n Date: Fri, 8 Aug 2014 16:47:42 +0100 Message-ID: <1407512862-9373-14-git-send-email-talex5@gmail.com> References: <1407512862-9373-1-git-send-email-talex5@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XFmOP-0007GQ-If for xen-devel@lists.xenproject.org; Fri, 08 Aug 2014 15:47:45 +0000 Received: by mail-wi0-f179.google.com with SMTP id f8so1236707wiw.0 for ; Fri, 08 Aug 2014 08:47:44 -0700 (PDT) In-Reply-To: <1407512862-9373-1-git-send-email-talex5@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xenproject.org Cc: Thomas Leonard , Dave.Scott@eu.citrix.com, anil@recoil.org, stefano.stabellini@eu.citrix.com, samuel.thibault@ens-lyon.org List-Id: xen-devel@lists.xenproject.org Without -fno-tree-loop-distribute-patterns, gcc -O3 recognises that our "memset" is doing a memset operation and tries to make it call the standard "memset", creating a loop. The change to fdt_ro.c is to avoid a compiler warning. Signed-off-by: Thomas Leonard --- extras/mini-os/minios.mk | 2 +- xen/common/libfdt/fdt_ro.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/extras/mini-os/minios.mk b/extras/mini-os/minios.mk index 20ba64b..3e881e4 100644 --- a/extras/mini-os/minios.mk +++ b/extras/mini-os/minios.mk @@ -23,7 +23,7 @@ DEF_CFLAGS += -g #DEF_CFLAGS += -DGNT_DEBUG #DEF_CFLAGS += -DGNTMAP_DEBUG else -DEF_CFLAGS += -O3 +DEF_CFLAGS += -O3 -fno-tree-loop-distribute-patterns endif # Make the headers define our internal stuff diff --git a/xen/common/libfdt/fdt_ro.c b/xen/common/libfdt/fdt_ro.c index 02b6d68..a34c6d6 100644 --- a/xen/common/libfdt/fdt_ro.c +++ b/xen/common/libfdt/fdt_ro.c @@ -444,7 +444,7 @@ int fdt_supernode_atdepth_offset(const void *fdt, int nodeoffset, int fdt_node_depth(const void *fdt, int nodeoffset) { - int nodedepth; + int nodedepth = -1; int err; err = fdt_supernode_atdepth_offset(fdt, nodeoffset, 0, &nodedepth); -- 2.0.3