diff options
author | caiyinyu <caiyinyu@loongson.cn> | 2023-09-15 17:35:19 +0800 |
---|---|---|
committer | caiyinyu <caiyinyu@loongson.cn> | 2024-04-24 18:22:38 +0800 |
commit | 095067efdf68c8061d6f99a21a0300841bede999 (patch) | |
tree | 6632c0cb08991fbd2c08809f24320493687c81a6 /sysdeps/loongarch/Makefile | |
parent | f4724843ada64a51d66f65d3199fe431f9d4c254 (diff) | |
download | glibc-095067efdf68c8061d6f99a21a0300841bede999.zip glibc-095067efdf68c8061d6f99a21a0300841bede999.tar.gz glibc-095067efdf68c8061d6f99a21a0300841bede999.tar.bz2 |
LoongArch: Add glibc.cpu.hwcap support.
The current IFUNC selection is always using the most recent
features which are available via AT_HWCAP. But in
some scenarios it is useful to adjust this selection.
The environment variable:
GLIBC_TUNABLES=glibc.cpu.hwcaps=-xxx,yyy,zzz,....
can be used to enable HWCAP feature yyy, disable HWCAP feature xxx,
where the feature name is case-sensitive and has to match the ones
used in sysdeps/loongarch/cpu-tunables.c.
Signed-off-by: caiyinyu <caiyinyu@loongson.cn>
Diffstat (limited to 'sysdeps/loongarch/Makefile')
-rw-r--r-- | sysdeps/loongarch/Makefile | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/sysdeps/loongarch/Makefile b/sysdeps/loongarch/Makefile index 43d2f58..446bda6 100644 --- a/sysdeps/loongarch/Makefile +++ b/sysdeps/loongarch/Makefile @@ -1,11 +1,23 @@ ifeq ($(subdir),misc) sysdep_headers += sys/asm.h + +tests += \ + tst-hwcap-tunables \ + # tests + +tst-hwcap-tunables-ARGS = -- $(host-test-program-cmd) endif ifeq ($(subdir),elf) gen-as-const-headers += dl-link.sym endif +ifeq ($(subdir),elf) +sysdep-dl-routines += \ + dl-get-cpu-features \ + # sysdep-dl-routines +endif + # LoongArch's assembler also needs to know about PIC as it changes the # definition of some assembler macros. ASFLAGS-.os += $(pic-ccflag) |