about summary refs log tree commit diff
path: root/sysdeps/loongarch/configure.ac
diff options
context:
space:
mode:
authormengqinggang <mengqinggang@loongson.cn>2024-05-08 10:06:15 +0800
committercaiyinyu <caiyinyu@loongson.cn>2024-05-15 10:31:53 +0800
commit1dbf2bef7934cee9829d875f11968d6ff1fee77f (patch)
treed9e2a0c544e5a7468bfc5149613155f2d2d4efdf /sysdeps/loongarch/configure.ac
parentf942a732d37a96217ef828116ebe64a644db18d7 (diff)
downloadglibc-1dbf2bef7934cee9829d875f11968d6ff1fee77f.tar.gz
glibc-1dbf2bef7934cee9829d875f11968d6ff1fee77f.tar.xz
glibc-1dbf2bef7934cee9829d875f11968d6ff1fee77f.zip
LoongArch: Add support for TLS Descriptors
This is mostly based on AArch64 and RISC-V implementation.

Add R_LARCH_TLS_DESC32 and R_LARCH_TLS_DESC64 relocations.

For _dl_tlsdesc_dynamic function slow path, temporarily save and restore
all vector registers.
Diffstat (limited to 'sysdeps/loongarch/configure.ac')
-rw-r--r--sysdeps/loongarch/configure.ac16
1 files changed, 16 insertions, 0 deletions
diff --git a/sysdeps/loongarch/configure.ac b/sysdeps/loongarch/configure.ac
index 28a8ae5486..24fee55dcc 100644
--- a/sysdeps/loongarch/configure.ac
+++ b/sysdeps/loongarch/configure.ac
@@ -65,3 +65,19 @@ rm -f conftest*])
 if test $libc_cv_loongarch_vec_asm = no; then
   AC_MSG_ERROR([binutils version is too old, use 2.41 or newer version])
 fi
+
+AC_CACHE_CHECK([for vector support in compiler],
+		libc_cv_loongarch_vec_com, [
+AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+void foo (void)
+{
+  asm volatile ("vldi $vr0, 1" ::: "$vr0");
+  asm volatile ("xvldi $xr0, 1" ::: "$xr0");
+}
+]])],
+                [libc_cv_loongarch_vec_com=yes],
+                [libc_cv_loongarch_vec_com=no])])
+if test "$libc_cv_loongarch_vec_com" = yes ;
+then
+  AC_DEFINE(HAVE_LOONGARCH_VEC_COM)
+fi