From 2ac925ef231b44a0a51f38c57cc761885221a83f Mon Sep 17 00:00:00 2001 From: Chris Pavlina Date: Thu, 7 Dec 2017 12:18:56 -0700 Subject: [PATCH] Fix build of newlib on aarch64 newlib on aarch64 uses a few nonstandard features that require special build flags: - Instruction formats not supported by LLVM's assembler, requiring `-no-integrated-as` to force use of binutils as - Inline assembly via `asm()` instead of `__asm__()`, not available in clang with `-std=c99` unless `-fasm` is given. Signed-off-by: Chris Pavlina --- scripts/cmake/depends/newlib.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/cmake/depends/newlib.cmake b/scripts/cmake/depends/newlib.cmake index 4e73c2fc2..a716895dd 100644 --- a/scripts/cmake/depends/newlib.cmake +++ b/scripts/cmake/depends/newlib.cmake @@ -30,6 +30,8 @@ if(NOT EXISTS "${BUILD_SYSROOT_VMM}/lib/libc.a" OR NOT EXISTS "${BUILD_SYSROOT_V list(APPEND NEWLIB_C_FLAGS "-O3" "-DNDEBUG" + "-no-integrated-as" + "-fasm" ) endif()