From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: qemu-devel@nongnu.org
Cc: Alexey Kardashevskiy <aik@ozlabs.ru>,
David Gibson <david@gibson.dropbear.id.au>,
Paolo Bonzini <pbonzini@redhat.com>,
Peter Maydell <peter.maydell@linaro.org>,
Thomas Huth <thuth@redhat.com>
Subject: [Qemu-devel] [RFC PATCH qemu] dtc: Allow compiling with old gcc
Date: Wed, 8 Mar 2017 23:49:55 +1100 [thread overview]
Message-ID: <20170308124955.35623-1-aik@ozlabs.ru> (raw)
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 <aik@ozlabs.ru>
---
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="-I\$(SRC_PATH)/dtc/libfdt"
+ fdt_cflags="-isystem\$(SRC_PATH)/dtc/libfdt"
fdt_libs="-L\$(BUILD_DIR)/dtc/libfdt $fdt_libs"
elif test "$fdt" = "yes" ; then
# have neither and want - prompt for system/submodule install
--
2.11.0
next reply other threads:[~2017-03-08 12:50 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-08 12:49 Alexey Kardashevskiy [this message]
2017-03-08 14:21 ` [Qemu-devel] [RFC PATCH qemu] dtc: Allow compiling with old gcc Peter Maydell
2017-03-09 0:52 ` Alexey Kardashevskiy
2017-03-09 1:31 ` David Gibson
2017-03-09 3:16 ` Alexey Kardashevskiy
2017-03-09 6:43 ` Peter Maydell
2017-03-10 0:29 ` David Gibson
2017-03-14 4:28 ` David Gibson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170308124955.35623-1-aik@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=david@gibson.dropbear.id.au \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).