manojgupta created this revision. manojgupta added reviewers: efriedma, joerg. Herald added subscribers: Sanitizers, llvm-commits, delcypher, mgorny.
float128 builtins are currently not built for x86_64. This causes linker to complain baout missing symbols when linking glibc 2.27 with float128 support. Repository: rCRT Compiler Runtime https://reviews.llvm.org/D53608 Files: lib/builtins/CMakeLists.txt lib/builtins/fp_lib.h Index: lib/builtins/fp_lib.h =================================================================== --- lib/builtins/fp_lib.h +++ lib/builtins/fp_lib.h @@ -103,11 +103,12 @@ COMPILER_RT_ABI fp_t __adddf3(fp_t a, fp_t b); #elif defined QUAD_PRECISION -#if __LDBL_MANT_DIG__ == 113 +// __LDBL_MANT_DIG__ is set to 64 for x86_64. +#if __LDBL_MANT_DIG__ == 113 || defined(__x86_64__) #define CRT_LDBL_128BIT typedef __uint128_t rep_t; typedef __int128_t srep_t; -typedef long double fp_t; +typedef __float128 fp_t; #define REP_C (__uint128_t) // Note: Since there is no explicit way to tell compiler the constant is a // 128-bit integer, we let the constant be casted to 128-bit integer Index: lib/builtins/CMakeLists.txt =================================================================== --- lib/builtins/CMakeLists.txt +++ lib/builtins/CMakeLists.txt @@ -232,6 +232,7 @@ if (NOT MSVC) set(x86_64_SOURCES + ${GENERIC_TF_SOURCES} x86_64/floatdidf.c x86_64/floatdisf.c x86_64/floatdixf.c
Index: lib/builtins/fp_lib.h =================================================================== --- lib/builtins/fp_lib.h +++ lib/builtins/fp_lib.h @@ -103,11 +103,12 @@ COMPILER_RT_ABI fp_t __adddf3(fp_t a, fp_t b); #elif defined QUAD_PRECISION -#if __LDBL_MANT_DIG__ == 113 +// __LDBL_MANT_DIG__ is set to 64 for x86_64. +#if __LDBL_MANT_DIG__ == 113 || defined(__x86_64__) #define CRT_LDBL_128BIT typedef __uint128_t rep_t; typedef __int128_t srep_t; -typedef long double fp_t; +typedef __float128 fp_t; #define REP_C (__uint128_t) // Note: Since there is no explicit way to tell compiler the constant is a // 128-bit integer, we let the constant be casted to 128-bit integer Index: lib/builtins/CMakeLists.txt =================================================================== --- lib/builtins/CMakeLists.txt +++ lib/builtins/CMakeLists.txt @@ -232,6 +232,7 @@ if (NOT MSVC) set(x86_64_SOURCES + ${GENERIC_TF_SOURCES} x86_64/floatdidf.c x86_64/floatdisf.c x86_64/floatdixf.c
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits