Describe the bug
Building nginx, sqlite and redis for ARM64 with Clang 18 results in an error.
This bug has been documented in Issue#1494 and fixed in this PR but later in an update the fp_arm64.c file was deleted and some functionality relocated to plat/native/arch/arm64/ectx.c , with the following regression in the plat/native/Makefile.c:25 :
LIBUKPLAT_NATIVE_SRCS-$(CONFIG_LIBUKPLAT_NATIVE_ECTX) += $(LIBUKPLAT_NATIVE_BASE)/arch/arm64/ectx.c|isr
The fix mirrors the old PR in that the suffix |isr is to be removed. This fix has been manually tested for all the above mentioned apps and shown to work.
Steps to reproduce
Make sure you have clang installed on your system and available in the system path. Then follow the steps below:
- Clone the catalog-core repository and run the
setup.sh script:
cd catalog-core/
./setup.sh
- Cd into one of the apps (nginx) and run the setup script there:
- Run the build for arm64 with Clang (make sure your clang version is 18 with
clang --version)
./.scripts/build/qemu.arm64
This will output the exact error featured below in the section Relevant log output.
The fix mentioned should be done in the nginx/workdir/unikraft/plat/native/arch/arm64/ectx.c file.
Expected behavior
Should build without any errors.
Which architectures were you using or does this bug affect?
x86_64
Which platforms were you using or does this bug affect?
kvm
Relevant log output
/home/unikraft/andreic/catalog-core/repos/unikraft/plat/native/arch/arm64/ectx.c:36:3: error: expected readable system register
36 | "mrs %0, fpcr\n"
| ^
<inline asm>:1:10: note: instantiated into assembly here
1 | mrs x8, fpcr
| ^
/home/unikraft/andreic/catalog-core/repos/unikraft/plat/native/arch/arm64/ectx.c:37:4: error: expected readable system register
37 | "mrs %1, fpsr\n"
| ^
<inline asm>:2:9: note: instantiated into assembly here
2 | mrs x9, fpsr
| ^
/home/unikraft/andreic/catalog-core/repos/unikraft/plat/native/arch/arm64/ectx.c:38:4: error: instruction requires: fp-armv8
38 | "stp q0, q1, [%2, #16 * 0]\n"
| ^
<inline asm>:3:1: note: instantiated into assembly here
3 | stp q0, q1, [x0, #16 * 0]
| ^
/home/unikraft/andreic/catalog-core/repos/unikraft/plat/native/arch/arm64/ectx.c:39:4: error: instruction requires: fp-armv8
39 | "stp q2, q3, [%2, #16 * 2]\6 warnings generated.
n"
| ^
<inline asm>:4:1: note: instantiated into assembly here
4 | stp q2, q3, [x0, #16 * 2]
| ^
/home/unikraft/andreic/catalog-core/repos/unikraft/plat/native/arch/arm64/ectx.c:40:4: error: instruction requires: fp-armv8
40 | "stp q4, q5, [%2, #16 * 4]\n"
| ^
<inline asm>:5:1: note: instantiated into assembly here
5 | stp q4, q5, [x0, #16 * 4]
| ^
/home/unikraft/andreic/catalog-core/repos/unikraft/plat/native/arch/arm64/ectx.c:41:4: error: instruction requires: fp-armv8
41 | "stp q6, q7, [%2, #16 * 6]\n"
| ^
<inline asm>:6:1: note: instantiated into assembly here
6 | stp q6, q7, [x0, #16 * 6]
| ^
Describe the bug
Building nginx, sqlite and redis for ARM64 with Clang 18 results in an error.
This bug has been documented in Issue#1494 and fixed in this PR but later in an update the
fp_arm64.cfile was deleted and some functionality relocated toplat/native/arch/arm64/ectx.c, with the following regression in theplat/native/Makefile.c:25:The fix mirrors the old PR in that the suffix
|isris to be removed. This fix has been manually tested for all the above mentioned apps and shown to work.Steps to reproduce
Make sure you have clang installed on your system and available in the system path. Then follow the steps below:
setup.shscript:cd catalog-core/ ./setup.shcd nginx/ ./setup.shclang --version)This will output the exact error featured below in the section
Relevant log output.The fix mentioned should be done in the
nginx/workdir/unikraft/plat/native/arch/arm64/ectx.cfile.Expected behavior
Should build without any errors.
Which architectures were you using or does this bug affect?
x86_64
Which platforms were you using or does this bug affect?
kvm
Relevant log output