Skip to content

Commit

Permalink
Fix build of newlib on aarch64
Browse files Browse the repository at this point in the history
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 <pavlinac@ainfosec.com>
  • Loading branch information
Chris Pavlina committed Dec 7, 2017
1 parent f70de19 commit 2ac925e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions scripts/cmake/depends/newlib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down

0 comments on commit 2ac925e

Please sign in to comment.