diff options
author | Shiyou Yin <yinshiyou-hf@loongson.cn> | 2021-12-01 06:52:19 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-12-01 19:44:56 +0300 |
commit | 07f8f78a5fb8b6a28f7b9d79fae6e411a17114ee (patch) | |
tree | 9ce6d4bdaec05ad5de4a270086f29f0bee92cd09 /configure | |
parent | 12f8293c025f0a6103f2d0a05b05bffa9f4ff434 (diff) |
configure: Add support for loongarch.
For la464 cpu: ./configure --cpu=la464
With cross-compiler:
./configure --cross-prefix=loongarch64-linux-gnu- \
--enable-cross-compile --arch=loongarch64 \
--target-os=linux --cpu=la464
Reviewed-by: 陈昊 <chenhao@loongson.cn>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 23 |
1 files changed, 23 insertions, 0 deletions
@@ -2032,6 +2032,9 @@ ARCH_LIST=" avr32_uc bfin ia64 + loongarch + loongarch32 + loongarch64 m68k mips mips64 @@ -4959,6 +4962,9 @@ case "$arch" in arm*|iPad*|iPhone*) arch="arm" ;; + loongarch*) + arch="loongarch" + ;; mips*|IP*) case "$arch" in *el) @@ -5106,6 +5112,18 @@ elif enabled bfin; then cpuflags="-mcpu=$cpu" +elif enabled loongarch; then + + enable local_aligned + enable simd_align_32 + enable fast_64bit + enable fast_clz + enable fast_unaligned + case $cpu in + la464) + cpuflags="-march=$cpu" + ;; + esac elif enabled mips; then if [ "$cpu" != "generic" ]; then @@ -5362,6 +5380,11 @@ case "$arch" in aarch64|alpha|ia64) enabled shared && enable_weak pic ;; + loongarch) + check_64bit loongarch32 loongarch64 + enabled loongarch64 && disable loongarch32 + enabled shared && enable_weak pic + ;; mips) check_64bit mips mips64 '_MIPS_SIM > 1' enabled shared && enable_weak pic |