diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-15 11:54:17 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-17 09:47:45 +0100 |
commit | 698127e1ab8bccca36ff430c39d23d4510aa958e (patch) | |
tree | 0cf72ad7603c491193a3fbf99d111ff1c2039faa /meta | |
parent | 3c1f1b991300d50ebed88c521b6c865b89a0b90f (diff) | |
download | poky-698127e1ab8bccca36ff430c39d23d4510aa958e.tar.gz |
Revert "qemu: always define unknown_lock_type"
This reverts commit e442924d9ac4e202aec571b5d26bb959b5faaadd.
This was rejected upstream and its been pointed out qemu doesn't work
without optimization.
Instead we should just error if the user attempts to build it without
optimization.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/qemu/qemu.inc | 3 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu/0001-lockable.h-always-define-unknown_lock_type.patch | 48 | ||||
-rw-r--r-- | meta/recipes-devtools/qemu/qemu_5.1.0.bb | 5 |
3 files changed, 6 insertions, 50 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc index 7f7f3b59fc..9091115caf 100644 --- a/meta/recipes-devtools/qemu/qemu.inc +++ b/meta/recipes-devtools/qemu/qemu.inc | |||
@@ -31,8 +31,7 @@ SRC_URI = "https://download.qemu.org/${BPN}-${PV}.tar.xz \ | |||
31 | file://0001-qemu-Do-not-include-file-if-not-exists.patch \ | 31 | file://0001-qemu-Do-not-include-file-if-not-exists.patch \ |
32 | file://find_datadir.patch \ | 32 | file://find_datadir.patch \ |
33 | file://usb-fix-setup_len-init.patch \ | 33 | file://usb-fix-setup_len-init.patch \ |
34 | file://0001-lockable.h-always-define-unknown_lock_type.patch \ | 34 | " |
35 | " | ||
36 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" | 35 | UPSTREAM_CHECK_REGEX = "qemu-(?P<pver>\d+(\.\d+)+)\.tar" |
37 | 36 | ||
38 | SRC_URI[sha256sum] = "c9174eb5933d9eb5e61f541cd6d1184cd3118dfe4c5c4955bc1bdc4d390fa4e5" | 37 | SRC_URI[sha256sum] = "c9174eb5933d9eb5e61f541cd6d1184cd3118dfe4c5c4955bc1bdc4d390fa4e5" |
diff --git a/meta/recipes-devtools/qemu/qemu/0001-lockable.h-always-define-unknown_lock_type.patch b/meta/recipes-devtools/qemu/qemu/0001-lockable.h-always-define-unknown_lock_type.patch deleted file mode 100644 index 2f51799bc9..0000000000 --- a/meta/recipes-devtools/qemu/qemu/0001-lockable.h-always-define-unknown_lock_type.patch +++ /dev/null | |||
@@ -1,48 +0,0 @@ | |||
1 | From 8c234bb39eb293a44ca58e15303a359bb782931f Mon Sep 17 00:00:00 2001 | ||
2 | From: Mingli Yu <mingli.yu@windriver.com> | ||
3 | Date: Wed, 9 Sep 2020 08:41:27 +0000 | ||
4 | Subject: [PATCH] lockable.h: always define unknown_lock_type | ||
5 | |||
6 | There comes below build failure when use gcc 10.1.0 and | ||
7 | "-Og" passed to compiler. | ||
8 | | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:25: undefined reference to `unknown_lock_type' | ||
9 | | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o: in function `fsdev_co_throttle_request': | ||
10 | | /mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: undefined reference to `unknown_lock_type' | ||
11 | | /usr/lib/gcc/x86_64-wrs-linux/10.1.0/../../../../x86_64-wrs-linux/bin/ld.bfd: ../fsdev/qemu-fsdev-throttle.o:/mnt/build/tmp/work/x86_64-linux/qemu-system-native/5.1.0-r0/qemu-5.1.0/fsdev/qemu-fsdev-throttle.c:103: more undefined references to `unknown_lock_type' follow | ||
12 | | collect2: error: ld returned 1 exit status | ||
13 | |||
14 | So always define unknown_lock_type to fix the above error. | ||
15 | |||
16 | Upstream-Status: Submitted [https://lists.nongnu.org/archive/html/qemu-devel/2020-09/msg03873.html] | ||
17 | |||
18 | Signed-off-by: Mingli Yu <mingli.yu@windriver.com> | ||
19 | --- | ||
20 | include/qemu/lockable.h | 7 +------ | ||
21 | 1 file changed, 1 insertion(+), 6 deletions(-) | ||
22 | |||
23 | diff --git a/include/qemu/lockable.h b/include/qemu/lockable.h | ||
24 | index b620023141..e792ed9a69 100644 | ||
25 | --- a/include/qemu/lockable.h | ||
26 | +++ b/include/qemu/lockable.h | ||
27 | @@ -25,17 +25,12 @@ struct QemuLockable { | ||
28 | }; | ||
29 | |||
30 | /* This function gives an error if an invalid, non-NULL pointer type is passed | ||
31 | - * to QEMU_MAKE_LOCKABLE. For optimized builds, we can rely on dead-code elimination | ||
32 | - * from the compiler, and give the errors already at link time. | ||
33 | + * to QEMU_MAKE_LOCKABLE. | ||
34 | */ | ||
35 | -#if defined(__OPTIMIZE__) && !defined(__SANITIZE_ADDRESS__) | ||
36 | -void unknown_lock_type(void *); | ||
37 | -#else | ||
38 | static inline void unknown_lock_type(void *unused) | ||
39 | { | ||
40 | abort(); | ||
41 | } | ||
42 | -#endif | ||
43 | |||
44 | static inline __attribute__((__always_inline__)) QemuLockable * | ||
45 | qemu_make_lockable(void *x, QemuLockable *lockable) | ||
46 | -- | ||
47 | 2.26.2 | ||
48 | |||
diff --git a/meta/recipes-devtools/qemu/qemu_5.1.0.bb b/meta/recipes-devtools/qemu/qemu_5.1.0.bb index a4018cc448..9b09490269 100644 --- a/meta/recipes-devtools/qemu/qemu_5.1.0.bb +++ b/meta/recipes-devtools/qemu/qemu_5.1.0.bb | |||
@@ -10,6 +10,11 @@ DEPENDS = "glib-2.0 zlib pixman bison-native" | |||
10 | 10 | ||
11 | RDEPENDS_${PN}_class-target += "bash" | 11 | RDEPENDS_${PN}_class-target += "bash" |
12 | 12 | ||
13 | # Does not compile for -Og because that level does not clean up dead-code. | ||
14 | # See lockable.h. | ||
15 | # | ||
16 | DEBUG_BUILD = "0" | ||
17 | |||
13 | EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}" | 18 | EXTRA_OECONF_append_class-target = " --target-list=${@get_qemu_target_list(d)}" |
14 | EXTRA_OECONF_append_class-target_mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" | 19 | EXTRA_OECONF_append_class-target_mipsarcho32 = "${@bb.utils.contains('BBEXTENDCURR', 'multilib', ' --disable-capstone', '', d)}" |
15 | EXTRA_OECONF_append_class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" | 20 | EXTRA_OECONF_append_class-nativesdk = " --target-list=${@get_qemu_target_list(d)}" |