diff options
author | Deepthi Hemraj <Deepthi.Hemraj@windriver.com> | 2024-12-01 20:35:14 -0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2024-12-03 11:21:34 +0000 |
commit | e7a7d07dfd1cc22ad6883cfb0ffcd3984d70d096 (patch) | |
tree | aeb4892184fec07fef007c4abce6a4abf25a3ad3 /meta/recipes-devtools | |
parent | b15fc7cdf96e5bf096ace9532333853fe6f8c1ac (diff) | |
download | poky-e7a7d07dfd1cc22ad6883cfb0ffcd3984d70d096.tar.gz |
gcc-sanitizers: Add riscv64 as compatible host
RISC-V offers several virtual memory address schemes (Sv39, Sv48, and Sv57),
but ASan currently supports only Sv39 on RISC-V64.
For RISC-V64 Sv39, ASan uses custom allocator configurations
tuned to manage large allocations efficiently.
These tunings are incompatible with larger address spaces like
Sv48/Sv57 due to differences in region sizes and alignment.
For riscv64, Asan's tuning for Sv39 can be enabled in qemu
by using the appropriate flag in the command line as shown below:
runqemu nographic qemuparams="-cpu rv64,sv39=true"
Additionally, the COMPATIBLE_HOST list in gcc-sanitizers has been
updated to include riscv64. All necessary tests were successfully
conducted on both hardware(Microchip PolarFire SoC)
and the qemurisv64 environment, with ASan effectively
detecting memory errors in both scenarios.
(From OE-Core rev: 4b4450ff695ef73bf7a2437e142d2e0730d6a547)
Signed-off-by: Deepthi Hemraj <Deepthi.Hemraj@windriver.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-sanitizers.inc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers.inc b/meta/recipes-devtools/gcc/gcc-sanitizers.inc index 524ebd4ba4..8c98e9cf8a 100644 --- a/meta/recipes-devtools/gcc/gcc-sanitizers.inc +++ b/meta/recipes-devtools/gcc/gcc-sanitizers.inc | |||
@@ -73,13 +73,14 @@ RRECOMMENDS:${PN}:append:x86 = " liblsan" | |||
73 | RRECOMMENDS:${PN}:append:x86-64 = " liblsan libtsan" | 73 | RRECOMMENDS:${PN}:append:x86-64 = " liblsan libtsan" |
74 | RRECOMMENDS:${PN}:append:powerpc64 = " liblsan libtsan" | 74 | RRECOMMENDS:${PN}:append:powerpc64 = " liblsan libtsan" |
75 | RRECOMMENDS:${PN}:append:aarch64 = " liblsan libtsan" | 75 | RRECOMMENDS:${PN}:append:aarch64 = " liblsan libtsan" |
76 | RRECOMMENDS:${PN}:append:riscv64 = " liblsan libtsan" | ||
76 | 77 | ||
77 | do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" | 78 | do_package_write_ipk[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" |
78 | do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" | 79 | do_package_write_deb[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" |
79 | do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" | 80 | do_package_write_rpm[depends] += "virtual/${MLPREFIX}${TARGET_PREFIX}compilerlibs:do_packagedata" |
80 | 81 | ||
81 | # Only x86, powerpc, sparc, s390, arm, aarch64 and loongarch64 are supported | 82 | # Only x86, powerpc, sparc, s390, arm, aarch64 and loongarch64 are supported |
82 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64|loongarch64).*-linux' | 83 | COMPATIBLE_HOST = '(x86_64|i.86|powerpc|sparc|s390|arm|aarch64|loongarch64|riscv64).*-linux' |
83 | # musl is currently broken entirely | 84 | # musl is currently broken entirely |
84 | COMPATIBLE_HOST:libc-musl = 'null' | 85 | COMPATIBLE_HOST:libc-musl = 'null' |
85 | 86 | ||