Index: compiler-rt/lib/builtins/CMakeLists.txt =================================================================== --- compiler-rt/lib/builtins/CMakeLists.txt +++ compiler-rt/lib/builtins/CMakeLists.txt @@ -621,9 +621,11 @@ set(mips64el_SOURCES ${GENERIC_TF_SOURCES} ${mips_SOURCES}) +set(powerpc_SOURCES ${GENERIC_SOURCES}) + set(powerpcspe_SOURCES ${GENERIC_SOURCES}) -set(powerpc_SOURCES +set(powerpc64_SOURCES ppc/divtc3.c ppc/fixtfdi.c ppc/fixunstfdi.c @@ -638,15 +640,14 @@ ) # These routines require __int128, which isn't supported on AIX. if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX") - set(powerpc_SOURCES + set(powerpc64_SOURCES ppc/floattitf.c ppc/fixtfti.c ppc/fixunstfti.c - ${powerpc_SOURCES} + ${powerpc64_SOURCES} ) endif() -set(powerpc64le_SOURCES ${powerpc_SOURCES}) -set(powerpc64_SOURCES ${powerpc_SOURCES}) +set(powerpc64le_SOURCES ${powerpc64_SOURCES}) set(riscv_SOURCES riscv/save.S @@ -753,8 +754,9 @@ list(APPEND BUILTIN_CFLAGS_${arch} -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET) endif() - # For some arches, force enable int128 for compiling long double routines. - if("${arch}" STREQUAL "powerpc" OR "${arch}" STREQUAL "riscv32") + # For RISCV32, we must force enable int128 for compiling long + # double routines. + if("${arch}" STREQUAL "riscv32") list(APPEND BUILTIN_CFLAGS_${arch} -fforce-enable-int128) endif() Index: compiler-rt/lib/builtins/int_types.h =================================================================== --- compiler-rt/lib/builtins/int_types.h +++ compiler-rt/lib/builtins/int_types.h @@ -64,7 +64,7 @@ } udwords; #if defined(__LP64__) || defined(__wasm__) || defined(__mips64) || \ - defined(__riscv) || defined(_WIN64) || defined(__powerpc__) + defined(__riscv) || defined(_WIN64) #define CRT_HAS_128BIT #endif