diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2017-02-21 19:55:26 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-03-01 23:27:07 +0000 |
| commit | 6c23b6c5866ed952f004ff7cae24a905713b2641 (patch) | |
| tree | 63383792b7b3c44ddfc49ed662d9d2e4cbf458bc /meta/recipes-devtools | |
| parent | 584761577bc819ec45c2c8d86ff8d29748f9a051 (diff) | |
| download | poky-6c23b6c5866ed952f004ff7cae24a905713b2641.tar.gz | |
qemu: fix build with glibc-2.25
(From OE-Core rev: c0ab96a7b7d2c41167e2ad79be76f6eec2b6ebb5)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu/glibc-2.25.patch | 88 | ||||
| -rw-r--r-- | meta/recipes-devtools/qemu/qemu_2.8.0.bb | 1 |
2 files changed, 89 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch b/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch new file mode 100644 index 0000000000..a6908bdbf9 --- /dev/null +++ b/meta/recipes-devtools/qemu/qemu/glibc-2.25.patch | |||
| @@ -0,0 +1,88 @@ | |||
| 1 | From: Christopher Covington | ||
| 2 | Date: Wed, 28 Dec 2016 15:04:33 -0500 | ||
| 3 | Subject: [Qemu-devel] [PATCH v3] build: include sys/sysmacros.h for major() and minor()a | ||
| 4 | |||
| 5 | The definition of the major() and minor() macros are moving within glibc to | ||
| 6 | <sys/sysmacros.h>. Include this header when it is available to avoid the | ||
| 7 | following sorts of build-stopping messages: | ||
| 8 | |||
| 9 | qga/commands-posix.c: In function ‘dev_major_minor’: | ||
| 10 | qga/commands-posix.c:656:13: error: In the GNU C Library, "major" is defined | ||
| 11 | by <sys/sysmacros.h>. For historical compatibility, it is | ||
| 12 | currently defined by <sys/types.h> as well, but we plan to | ||
| 13 | remove this soon. To use "major", include <sys/sysmacros.h> | ||
| 14 | directly. If you did not intend to use a system-defined macro | ||
| 15 | "major", you should undefine it after including <sys/types.h>. [-Werror] | ||
| 16 | *devmajor = major(st.st_rdev); | ||
| 17 | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 18 | |||
| 19 | qga/commands-posix.c:657:13: error: In the GNU C Library, "minor" is defined | ||
| 20 | by <sys/sysmacros.h>. For historical compatibility, it is | ||
| 21 | currently defined by <sys/types.h> as well, but we plan to | ||
| 22 | remove this soon. To use "minor", include <sys/sysmacros.h> | ||
| 23 | directly. If you did not intend to use a system-defined macro | ||
| 24 | "minor", you should undefine it after including <sys/types.h>. [-Werror] | ||
| 25 | *devminor = minor(st.st_rdev); | ||
| 26 | ^~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
| 27 | |||
| 28 | The additional include allows the build to complete on Fedora 26 (Rawhide) | ||
| 29 | with glibc version 2.24.90. | ||
| 30 | |||
| 31 | Signed-off-by: Christopher Covington <address@hidden> | ||
| 32 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> | ||
| 33 | |||
| 34 | Upstream-Status: Submitted https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg03548.html | ||
| 35 | |||
| 36 | diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure | ||
| 37 | --- qemu-2.8.0.orig/configure 2017-02-21 19:05:13.180094708 +0100 | ||
| 38 | +++ qemu-2.8.0/configure 2017-02-21 19:08:53.114087084 +0100 | ||
| 39 | @@ -4727,6 +4727,20 @@ | ||
| 40 | then | ||
| 41 | fi | ||
| 42 | |||
| 43 | ########################################## | ||
| 44 | +# check for sysmacros.h | ||
| 45 | + | ||
| 46 | +have_sysmacros=no | ||
| 47 | +cat > $TMPC << EOF | ||
| 48 | +#include <sys/sysmacros.h> | ||
| 49 | +int main(void) { | ||
| 50 | + return makedev(0, 0); | ||
| 51 | +} | ||
| 52 | +EOF | ||
| 53 | +if compile_prog "" "" ; then | ||
| 54 | + have_sysmacros=yes | ||
| 55 | +fi | ||
| 56 | + | ||
| 57 | +########################################## | ||
| 58 | # End of CC checks | ||
| 59 | # After here, no more $cc or $ld runs | ||
| 60 | |||
| 61 | diff -uNr qemu-2.8.0.orig/configure qemu-2.8.0/configure | ||
| 62 | --- qemu-2.8.0.orig/configure 2017-02-21 19:05:13.180094708 +0100 | ||
| 63 | +++ qemu-2.8.0/configure 2017-02-21 19:08:53.114087084 +0100 | ||
| 64 | @@ -5695,6 +5709,10 @@ | ||
| 65 | echo "CONFIG_AF_VSOCK=y" >> $config_host_mak | ||
| 66 | fi | ||
| 67 | |||
| 68 | +if test "$have_sysmacros" = "yes" ; then | ||
| 69 | + echo "CONFIG_SYSMACROS=y" >> $config_host_mak | ||
| 70 | +fi | ||
| 71 | + | ||
| 72 | # Hold two types of flag: | ||
| 73 | # CONFIG_THREAD_SETNAME_BYTHREAD - we've got a way of setting the name on | ||
| 74 | # a thread we have a handle to | ||
| 75 | diff -uNr qemu-2.8.0.orig/include/sysemu/os-posix.h qemu-2.8.0/include/sysemu/os-posix.h | ||
| 76 | --- qemu-2.8.0.orig/include/sysemu/os-posix.h 2016-12-20 21:16:48.000000000 +0100 | ||
| 77 | +++ qemu-2.8.0/include/sysemu/os-posix.h 2017-02-21 19:07:18.009090381 +0100 | ||
| 78 | @@ -34,6 +34,10 @@ | ||
| 79 | #include <netdb.h> | ||
| 80 | #include <sys/un.h> | ||
| 81 | |||
| 82 | +#ifdef CONFIG_SYSMACROS | ||
| 83 | +#include <sys/sysmacros.h> | ||
| 84 | +#endif | ||
| 85 | + | ||
| 86 | void os_set_line_buffering(void); | ||
| 87 | void os_set_proc_name(const char *s); | ||
| 88 | void os_setup_signal_handling(void); | ||
diff --git a/meta/recipes-devtools/qemu/qemu_2.8.0.bb b/meta/recipes-devtools/qemu/qemu_2.8.0.bb index f25aa467e5..ce475e02cb 100644 --- a/meta/recipes-devtools/qemu/qemu_2.8.0.bb +++ b/meta/recipes-devtools/qemu/qemu_2.8.0.bb | |||
| @@ -9,6 +9,7 @@ SRC_URI += "file://configure-fix-Darwin-target-detection.patch \ | |||
| 9 | file://pathlimit.patch \ | 9 | file://pathlimit.patch \ |
| 10 | file://qemu-2.5.0-cflags.patch \ | 10 | file://qemu-2.5.0-cflags.patch \ |
| 11 | file://target-ppc-fix-user-mode.patch \ | 11 | file://target-ppc-fix-user-mode.patch \ |
| 12 | file://glibc-2.25.patch \ | ||
| 12 | " | 13 | " |
| 13 | 14 | ||
| 14 | SRC_URI += " \ | 15 | SRC_URI += " \ |
