From patchwork Mon May 27 04:20:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Crosthwaite X-Patchwork-Id: 246523 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 84F562C02A1 for ; Mon, 27 May 2013 14:24:37 +1000 (EST) Received: from localhost ([::1]:48163 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugoz5-0002pC-NZ for incoming@patchwork.ozlabs.org; Mon, 27 May 2013 00:24:35 -0400 Received: from eggs.gnu.org ([208.118.235.92]:54433) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ugoyf-0002nP-NR for qemu-devel@nongnu.org; Mon, 27 May 2013 00:24:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UgoyW-00082P-5I for qemu-devel@nongnu.org; Mon, 27 May 2013 00:24:09 -0400 Received: from mail-pa0-f42.google.com ([209.85.220.42]:45246) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UgoyV-00082A-Td for qemu-devel@nongnu.org; Mon, 27 May 2013 00:24:00 -0400 Received: by mail-pa0-f42.google.com with SMTP id bj1so1146363pad.29 for ; Sun, 26 May 2013 21:23:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=KV15aTsDikfjNM75WHfzz6O7VwHgLWSzUqP7lBpR6Zk=; b=JPxGdAP8LjiI4m90S/vOp86OK91wFyjaR6hr5paYA7Kk49Y4qZkVNq8WH9cMtUaw1a nkTPZcyMVmOr74rwtl3FmRB1j+KTdecsgzVftlg5JgNCP4SEAMwaCOmxwHvbBp4jXdhD Q/Hmc1bl/rpDwgVP2lNn7LfHItrw949GCl/6ZEDMSjGuxml73DwYpBw6Q9NoqVX4+hjK Ew8MjqAigXVlSh/ExC4GMAdnKrShVecjyHfSAT5VufQqRmcYY8H5KJp2MYbZVhVoFMqe Hs6PUdZW8mZXHomcwhgIp5LJIwnirzK2EGXeypg4SscfjT8fA1ZzI06HHfZXjXf+8Ak5 wWlg== X-Received: by 10.68.176.133 with SMTP id ci5mr27630961pbc.21.1369628639115; Sun, 26 May 2013 21:23:59 -0700 (PDT) Received: from localhost ([203.126.243.116]) by mx.google.com with ESMTPSA id qh4sm28821352pac.8.2013.05.26.21.23.52 for (version=TLSv1.1 cipher=RC4-SHA bits=128/128); Sun, 26 May 2013 21:23:58 -0700 (PDT) From: peter.crosthwaite@xilinx.com To: qemu-devel@nongnu.org Date: Mon, 27 May 2013 14:20:57 +1000 Message-Id: <9b6a3a52e3f46cfbc1ded9ab56385ec045e46705.1369628289.git.peter.crosthwaite@xilinx.com> X-Mailer: git-send-email 1.8.3.rc1.44.gb387c77.dirty X-Gm-Message-State: ALoCoQk4ZWAhR6t2buDmyGhZy6oGM/ggM9R+v+ZFB970AXSHRA61pGd0tL3VXuoggGDX69aaanX3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.220.42 Cc: peter.maydell@linaro.org, pbonzini@redhat.com, edgar.iglesias@gmail.com Subject: [Qemu-devel] [PATCH v2 1/1] configure: dtc: Probe for libfdt_env.h X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Peter Crosthwaite Currently QEMU provides a local clone of the file libfdt_env.h in /include. This file is supposed to come with the libfdt package and is only needed for broken installs of libfdt. Now that we have submodule dtc, just ignore these broken installs and prompt for the dtc submodule install instead. QEMU's local libfdt_env.h is removed accordingly. Manifests as a bug when building QEMU with modern libfdt. The new version of libfdt does not compile when QEMUs libfdt_env.h takes precedence over the hosts. Signed-off-by: Peter Crosthwaite Reviewed-by: Peter Maydell --- changed since V1: Just fallback to submodule rather than provide libfdt_env.h I suggest this patch goes in behind PMMs patches to make dtc compulsory for PPC/MB/ARM to avoid silent regressions for current users of dtc 1.3.0. To replicate bug (install latest dtc from src to host and make): git submodule update --init dtc cd dtc git checkout master make sudo make install PREFIX=/usr/local cd .. ./configure --target-list="arm-softmmu" --enable-fdt make configure | 2 ++ include/libfdt_env.h | 36 ------------------------------------ 2 files changed, 2 insertions(+), 36 deletions(-) delete mode 100644 include/libfdt_env.h diff --git a/configure b/configure index eb74510..87bc9a7 100755 --- a/configure +++ b/configure @@ -2519,7 +2519,9 @@ fi # fdt probe if test "$fdt" != "no" ; then fdt_libs="-lfdt" + # explicitly check for libfdt_env.h as it is missing in some stable installs cat > $TMPC << EOF +#include int main(void) { return 0; } EOF if compile_prog "" "$fdt_libs" ; then diff --git a/include/libfdt_env.h b/include/libfdt_env.h deleted file mode 100644 index 3667d4c..0000000 --- a/include/libfdt_env.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License, version 2, as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, see . - * - * Copyright IBM Corp. 2008 - * Authors: Hollis Blanchard - * - */ - -#ifndef _LIBFDT_ENV_H -#define _LIBFDT_ENV_H - -#include "qemu/bswap.h" - -#ifdef HOST_WORDS_BIGENDIAN -#define fdt32_to_cpu(x) (x) -#define cpu_to_fdt32(x) (x) -#define fdt64_to_cpu(x) (x) -#define cpu_to_fdt64(x) (x) -#else -#define fdt32_to_cpu(x) bswap32(x) -#define cpu_to_fdt32(x) bswap32(x) -#define fdt64_to_cpu(x) bswap64(x) -#define cpu_to_fdt64(x) bswap64(x) -#endif - -#endif /* _LIBFDT_ENV_H */