aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/loongarch/Makefile
diff options
context:
space:
mode:
authormengqinggang <mengqinggang@loongson.cn>2024-05-20 17:05:12 +0800
committercaiyinyu <caiyinyu@loongson.cn>2024-05-21 11:23:03 +0800
commit16d47c1594c5bcd334d0b8dbf147cda917f19bc4 (patch)
tree085bed18533ec6c63753cb865c6dc5f94f7a197a /sysdeps/loongarch/Makefile
parent4b30c644d24c07c06b587cb46f2e50adc2c3c3f0 (diff)
downloadglibc-16d47c1594c5bcd334d0b8dbf147cda917f19bc4.tar.xz
glibc-16d47c1594c5bcd334d0b8dbf147cda917f19bc4.zip
LoongArch: Fix tst-gnu2-tls2 compiler error
Add -mno-lsx to tst-gnu2-tlsmod*.c if gcc support -mno-lsx. Add escape character '\' in vector support test function.
Diffstat (limited to 'sysdeps/loongarch/Makefile')
-rw-r--r--sysdeps/loongarch/Makefile2
1 files changed, 2 insertions, 0 deletions
diff --git a/sysdeps/loongarch/Makefile b/sysdeps/loongarch/Makefile
index a4ee915eff..b00c090faa 100644
--- a/sysdeps/loongarch/Makefile
+++ b/sysdeps/loongarch/Makefile
@@ -35,10 +35,12 @@ sysdep-dl-routines += \
# Disable the compiler from using LSX for TLS descriptor tests, or storing into
# 16B TLS variable may clobber FP/vector registers and prevent us from checking
# their contents.
+ifeq (yes,$(loongarch-vec-com))
CFLAGS-tst-gnu2-tls2mod0.c += -mno-lsx
CFLAGS-tst-gnu2-tls2mod1.c += -mno-lsx
CFLAGS-tst-gnu2-tls2mod2.c += -mno-lsx
endif
+endif
# LoongArch's assembler also needs to know about PIC as it changes the
# definition of some assembler macros.