Skip to content

Commit 1f255ac

Browse files
authored
Make fvp work for anything other than aarch64 when being set as the test machine (#574)
The current picolibc changes can't handle fvp being set as the test machine for anything other than aarch64. If fvp isn't set, it defaults to qemu, which works for now because the ARM fvp doesn't require anything special. However, when adding new aarch64 big-endian variants, one of the picolibc patches includes test-machine as an option in the Meson build scripts. Consequently, the library's CMake needs to set this option using -Dtest-machine=${TEST_EXECUTOR}. This means that for the armv8.1m library variant,we are explicitly passing the FPU, which can cause the error fvp: requested test machine not found since fvps are only defined for the aarch64 case.
1 parent 327f60c commit 1f255ac

File tree

2 files changed

+24
-4
lines changed

2 files changed

+24
-4
lines changed

arm-runtimes/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -390,6 +390,7 @@ if(C_LIBRARY STREQUAL picolibc)
390390
-Dmultilib=false
391391
-Dtests-enable-stack-protector=false
392392
-Dtest-long-double=${enable_picolibc_long_double_test}
393+
-Dtest-machine=${TEST_EXECUTOR}
393394
-Dnewlib-nano-malloc=${newlib_nano_malloc}
394395
-Dtests=false
395396
--prefix <INSTALL_DIR>

patches/picolibc/0002-Add-bootcode-for-AArch64-FVPs.patch

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
From f2ca20cebc85850a50b80424bb0f81c927edd04b Mon Sep 17 00:00:00 2001
1+
From 3b0b62ce6d81211a71eebe63b4b4ef0732da93ef Mon Sep 17 00:00:00 2001
22
From: Simi Pallipurath <[email protected]>
3-
Date: Thu, 14 Nov 2024 10:12:33 +0000
3+
Date: Mon, 25 Nov 2024 11:13:50 +0000
44
Subject: [PATCH 2/2] [PATCH 2/2] Add bootcode for AArch64 FVPs
55

66
The AArch64 FVP (Fixed Virtual Platform) models differ from QEMU in a
@@ -18,12 +18,13 @@ few ways which affect the crt0 code:
1818
picocrt/machine/aarch64/crt0.S | 200 +++++++++++++++++++
1919
picocrt/machine/aarch64/crt0.c | 198 +++----------------
2020
picocrt/machine/aarch64/meson.build | 9 +-
21+
picocrt/machine/arm/meson.build | 7 +
2122
picocrt/meson.build | 296 ++++++++++++++++------------
22-
6 files changed, 404 insertions(+), 303 deletions(-)
23+
7 files changed, 411 insertions(+), 303 deletions(-)
2324
create mode 100644 picocrt/machine/aarch64/crt0.S
2425

2526
diff --git a/meson.build b/meson.build
26-
index 4161d6574..9d3f5c672 100644
27+
index 012d664bd..b8f43c800 100644
2728
--- a/meson.build
2829
+++ b/meson.build
2930
@@ -151,6 +151,7 @@ multilib_exclude = get_option('multilib-exclude')
@@ -534,6 +535,21 @@ index 808d691a5..923d32c3b 100644
534535
+ 'suffix': '-fvp',
535536
+ },
536537
+]
538+
diff --git a/picocrt/machine/arm/meson.build b/picocrt/machine/arm/meson.build
539+
index 808d691a5..ecc9a485b 100644
540+
--- a/picocrt/machine/arm/meson.build
541+
+++ b/picocrt/machine/arm/meson.build
542+
@@ -33,3 +33,10 @@
543+
# OF THE POSSIBILITY OF SUCH DAMAGE.
544+
#
545+
src_picocrt += files('crt0.c')
546+
+
547+
+picocrt_machines += [
548+
+ {
549+
+ 'name': 'fvp',
550+
+ 'suffix': '-fvp',
551+
+ },
552+
+]
537553
diff --git a/picocrt/meson.build b/picocrt/meson.build
538554
index 76965990f..be8f875be 100644
539555
--- a/picocrt/meson.build
@@ -868,3 +884,6 @@ index 76965990f..be8f875be 100644
868884
+ endforeach
869885

870886
endforeach
887+
--
888+
2.34.1
889+

0 commit comments

Comments
 (0)