Index: compiler-rt/trunk/lib/builtins/CMakeLists.txt =================================================================== --- compiler-rt/trunk/lib/builtins/CMakeLists.txt +++ compiler-rt/trunk/lib/builtins/CMakeLists.txt @@ -44,7 +44,6 @@ ashrti3.c bswapdi2.c bswapsi2.c - clear_cache.c clzdi2.c clzsi2.c clzti2.c @@ -68,7 +67,6 @@ divti3.c divtf3.c divxc3.c - eprintf.c extendsfdf2.c extendhfsf2.c ffsdi2.c @@ -191,11 +189,12 @@ "Skip the atomic builtin (this may be needed if system headers are unavailable)" Off) -if(NOT COMPILER_RT_BAREMETAL_BUILD) +if(NOT FUCHSIA AND NOT COMPILER_RT_BAREMETAL_BUILD) set(GENERIC_SOURCES ${GENERIC_SOURCES} emutls.c - enable_execute_stack.c) + enable_execute_stack.c + eprintf.c) endif() if(COMPILER_RT_HAS_ATOMIC_KEYWORD AND NOT COMPILER_RT_EXCLUDE_ATOMIC_BUILTIN) @@ -221,6 +220,12 @@ gcc_personality_v0.c) endif () +if (NOT FUCHSIA) + set(GENERIC_SOURCES + ${GENERIC_SOURCES} + clear_cache.c) +endif() + if (NOT MSVC) set(x86_64_SOURCES x86_64/chkstk.S Index: compiler-rt/trunk/lib/builtins/int_util.c =================================================================== --- compiler-rt/trunk/lib/builtins/int_util.c +++ compiler-rt/trunk/lib/builtins/int_util.c @@ -45,6 +45,16 @@ __assert_rtn(function, file, line, "libcompiler_rt abort"); } +#elif __Fuchsia__ + +#ifndef _WIN32 +__attribute__((weak)) +__attribute__((visibility("hidden"))) +#endif +void compilerrt_abort_impl(const char *file, int line, const char *function) { + __builtin_trap(); +} + #else /* Get the system definition of abort() */