riscv-software-src / riscv-pk

RISC-V Proxy Kernel
Other
570 stars 304 forks source link

Compiling error in Mac M1 #306

Closed oneengineer closed 3 months ago

oneengineer commented 9 months ago

When I run make command: It reports error:

cc -MMD -MP -Wall -Werror -D__NO_INLINE__ -mcmodel=medany -O2 -std=gnu99 -Wno-unused -Wno-attributes -fno-delete-null-pointer-checks -fno-PIE -DBBL_LOGO_FILE=\"bbl_logo_file\" -DMEM_START=0x80000000 -fno-stack-protector -U_FORTIFY_SOURCE -DBBL_PAYLOAD=\"bbl_payload\" -I. -I../pk -I../bbl -I../softfloat -I../dummy_payload -I../machine -I../util -c ../pk/file.c fatal error: error in backend: Only small, tiny and large code models are allowed on AArch64 clang: error: clang frontend command failed with exit code 70 (use -v to see invocation) Apple clang version 13.1.6 (clang-1316.0.21.2.5) Target: arm64-apple-darwin21.4.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin clang: note: diagnostic msg:

How should I solve the problem

aswaterman commented 3 months ago

See https://github.com/riscv-software-src/riscv-pk/issues/204