From nobody Fri May 3 12:45:11 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1488977450060796.9277435434657; Wed, 8 Mar 2017 04:50:50 -0800 (PST) Received: from localhost ([::1]:56028 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clb3F-0004EV-4M for importer@patchew.org; Wed, 08 Mar 2017 07:50:45 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40063) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clb2d-00048h-9Z for qemu-devel@nongnu.org; Wed, 08 Mar 2017 07:50:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1clb2X-0002xe-EW for qemu-devel@nongnu.org; Wed, 08 Mar 2017 07:50:07 -0500 Received: from ozlabs.ru ([107.173.13.209]:49878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1clb2X-0002xT-95 for qemu-devel@nongnu.org; Wed, 08 Mar 2017 07:50:01 -0500 Received: from vpl2.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 8D39F3A6031E; Wed, 8 Mar 2017 07:49:54 -0500 (EST) From: Alexey Kardashevskiy To: qemu-devel@nongnu.org Date: Wed, 8 Mar 2017 23:49:55 +1100 Message-Id: <20170308124955.35623-1-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 107.173.13.209 Subject: [Qemu-devel] [RFC PATCH qemu] dtc: Allow compiling with old gcc X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexey Kardashevskiy , Paolo Bonzini , Thomas Huth , Peter Maydell , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" After 6e85fce0225f "dtc: Update requirement to v1.4.2" QEMU stopped compiling in CentOS7: In file included from /home/aik/p/qemu/dtc/libfdt/libfdt.h:54:0, from /home/aik/p/qemu/device_tree.c:30: /home/aik/p/qemu/dtc/libfdt/libfdt_env.h:64:0: error: "__bitwise" redefined= [-Werror] #define __bitwise ^ In file included from /usr/include/asm/ptrace.h:27:0, from /usr/include/asm/sigcontext.h:11, from /usr/include/bits/sigcontext.h:27, from /usr/include/signal.h:340, from /home/aik/p/qemu/include/qemu/osdep.h:86, from /home/aik/p/qemu/device_tree.c:14: /usr/include/linux/types.h:21:0: note: this is the location of the previous= definition #define __bitwise __bitwise__ ^ cc1: all warnings being treated as errors make: *** [device_tree.o] Error 1 make: *** Waiting for unfinished jobs.... The reason is that CentOS7 comes with libfdt 1.4.0 so QEMU tries using the internal one which does not compile as CentOS7 comes with gcc v4.8.5 which reports warnings which it would not if the OS's libfdt was used (libfdt_env.h has not changed between 1.4.0 and 1.4.2). gcc 6.2.0 from Ubuntu v16.10 handles this fine. This replaces -I with -isystem to suppress the warning (which turns to an error because of -Werror). Signed-off-by: Alexey Kardashevskiy --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 6c21975f02..2c2a5df14a 100755 --- a/configure +++ b/configure @@ -3414,7 +3414,7 @@ EOF symlink "$source_path/dtc/Makefile" "dtc/Makefile" symlink "$source_path/dtc/scripts" "dtc/scripts" fi - fdt_cflags=3D"-I\$(SRC_PATH)/dtc/libfdt" + fdt_cflags=3D"-isystem\$(SRC_PATH)/dtc/libfdt" fdt_libs=3D"-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs" elif test "$fdt" =3D "yes" ; then # have neither and want - prompt for system/submodule install --=20 2.11.0