diff options
| author | Khem Raj <raj.khem@gmail.com> | 2023-02-06 18:36:50 -0800 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2023-02-06 20:48:39 -0800 |
| commit | ac69a017011bf14fcd45cd653e1c1c6396884e8e (patch) | |
| tree | 8b07bd362e46e03370c9a69394d9f1ab4d39fc3e | |
| parent | 3d74a8d07d36454c6cf2b31c979a1d3afa8d51b7 (diff) | |
| download | meta-openembedded-ac69a017011bf14fcd45cd653e1c1c6396884e8e.tar.gz | |
ltrace: Fix build with clang16
Signed-off-by: Khem Raj <raj.khem@gmail.com>
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch | 86 | ||||
| -rw-r--r-- | meta-oe/recipes-devtools/ltrace/ltrace_git.bb | 1 |
2 files changed, 87 insertions, 0 deletions
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch new file mode 100644 index 0000000000..61932269bd --- /dev/null +++ b/meta-oe/recipes-devtools/ltrace/ltrace/0001-Fix-type-of-single-bit-bitfields.patch | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | From 491b3b153f6b5cbf2d23a9778e5676eb29a6705f Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Mon, 6 Feb 2023 16:37:19 -0800 | ||
| 4 | Subject: [PATCH] Fix type of single bit bitfields | ||
| 5 | |||
| 6 | clang16 warns | ||
| 7 | trace.c:311:22: error: implicit truncation from 'int' to a one-bit wide bit-field changes value from 1 to -1 [-Werror,-Wsingle-bit-bitfield-constant-conversion] | ||
| 8 | |||
| 9 | quash the warning by using an unsigned type to allow | ||
| 10 | an assignment of 0 or 1 without implicit conversion. | ||
| 11 | |||
| 12 | Upstream-Status: Pending | ||
| 13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 14 | --- | ||
| 15 | library.h | 6 +++--- | ||
| 16 | prototype.h | 2 +- | ||
| 17 | sysdeps/linux-gnu/trace.h | 10 +++++----- | ||
| 18 | 3 files changed, 9 insertions(+), 9 deletions(-) | ||
| 19 | |||
| 20 | --- a/library.h | ||
| 21 | +++ b/library.h | ||
| 22 | @@ -71,20 +71,20 @@ struct library_symbol { | ||
| 23 | * looking up one in LIB->protolib. */ | ||
| 24 | struct prototype *proto; | ||
| 25 | |||
| 26 | - int own_name : 1; | ||
| 27 | + unsigned int own_name : 1; | ||
| 28 | |||
| 29 | /* This is relevant for PLT symbols. Latent PLT symbols are | ||
| 30 | * those that don't match any of the -e rules, but that might | ||
| 31 | * potentially become active if a library implementing them | ||
| 32 | * appears that matches a -l rule. Ltrace core is responsible | ||
| 33 | * for clearing latent flag. */ | ||
| 34 | - int latent : 1; | ||
| 35 | + unsigned latent : 1; | ||
| 36 | |||
| 37 | /* Delayed symbols are those for which a breakpoint shouldn't | ||
| 38 | * be enabled yet. They are similar to latent symbols, but | ||
| 39 | * backend is responsible for clearing the delayed flag. See | ||
| 40 | * proc_activate_delayed_symbol. */ | ||
| 41 | - int delayed : 1; | ||
| 42 | + unsigned int delayed : 1; | ||
| 43 | |||
| 44 | struct arch_library_symbol_data arch; | ||
| 45 | struct os_library_symbol_data os; | ||
| 46 | --- a/prototype.h | ||
| 47 | +++ b/prototype.h | ||
| 48 | @@ -162,7 +162,7 @@ struct protolib_cache { | ||
| 49 | |||
| 50 | /* For tracking uses of cache during cache's own | ||
| 51 | * initialization. */ | ||
| 52 | - int bootstrap : 1; | ||
| 53 | + unsigned int bootstrap : 1; | ||
| 54 | }; | ||
| 55 | |||
| 56 | /* Initialize CACHE. Returns 0 on success or a negative value on | ||
| 57 | --- a/sysdeps/linux-gnu/trace.h | ||
| 58 | +++ b/sysdeps/linux-gnu/trace.h | ||
| 59 | @@ -33,11 +33,11 @@ | ||
| 60 | struct pid_task { | ||
| 61 | pid_t pid; /* This may be 0 for tasks that exited | ||
| 62 | * mid-handling. */ | ||
| 63 | - int sigstopped : 1; | ||
| 64 | - int got_event : 1; | ||
| 65 | - int delivered : 1; | ||
| 66 | - int vforked : 1; | ||
| 67 | - int sysret : 1; | ||
| 68 | + unsigned int sigstopped : 1; | ||
| 69 | + unsigned int got_event : 1; | ||
| 70 | + unsigned int delivered : 1; | ||
| 71 | + unsigned int vforked : 1; | ||
| 72 | + unsigned int sysret : 1; | ||
| 73 | }; | ||
| 74 | |||
| 75 | struct pid_set { | ||
| 76 | --- a/sysdeps/linux-gnu/trace.c | ||
| 77 | +++ b/sysdeps/linux-gnu/trace.c | ||
| 78 | @@ -1043,7 +1043,7 @@ ltrace_exiting_install_handler(struct pr | ||
| 79 | struct process_vfork_handler | ||
| 80 | { | ||
| 81 | struct event_handler super; | ||
| 82 | - int vfork_bp_refd:1; | ||
| 83 | + unsigned int vfork_bp_refd:1; | ||
| 84 | }; | ||
| 85 | |||
| 86 | static Event * | ||
diff --git a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb index 72bec301fb..976bb482aa 100644 --- a/meta-oe/recipes-devtools/ltrace/ltrace_git.bb +++ b/meta-oe/recipes-devtools/ltrace/ltrace_git.bb | |||
| @@ -31,6 +31,7 @@ SRC_URI = "git://github.com/sparkleholic/ltrace.git;branch=master;protocol=http; | |||
| 31 | file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ | 31 | file://0001-ppc-Remove-unused-host_powerpc64-function.patch \ |
| 32 | file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ | 32 | file://0001-mips-Use-hardcodes-values-for-ABI-syscall-bases.patch \ |
| 33 | file://0001-ppc-plt-do-not-free-symbol-libsym.patch \ | 33 | file://0001-ppc-plt-do-not-free-symbol-libsym.patch \ |
| 34 | file://0001-Fix-type-of-single-bit-bitfields.patch \ | ||
| 34 | " | 35 | " |
| 35 | SRC_URI:append:libc-musl = " file://add_ppc64le.patch" | 36 | SRC_URI:append:libc-musl = " file://add_ppc64le.patch" |
| 36 | 37 | ||
