diff mbox series

[FFmpeg-devel,1/3] configure: Add support for loongarch.

Message ID 20211109070910.4447-2-yinshiyou@loongson.cn
State New
Headers show
Series [FFmpeg-devel,1/3] configure: Add support for loongarch.
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Shiyou Yin Nov. 9, 2021, 7:09 a.m. UTC
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
---
 Changelog |  1 +
 configure | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)
diff mbox series

Patch

diff --git a/Changelog b/Changelog
index 765ec82915..60b74a3873 100644
--- a/Changelog
+++ b/Changelog
@@ -30,6 +30,7 @@  version <next>:
 - xcorrelate video filter
 - varblur video filter
 - huesaturation video filter
+- support loongarch.
 
 
 version 4.4:
diff --git a/configure b/configure
index c01aa480c7..b4be706b65 100755
--- a/configure
+++ b/configure
@@ -2020,6 +2020,9 @@  ARCH_LIST="
     avr32_uc
     bfin
     ia64
+    loongarch
+    loongarch32
+    loongarch64
     m68k
     mips
     mips64
@@ -4932,6 +4935,9 @@  case "$arch" in
     arm*|iPad*|iPhone*)
         arch="arm"
     ;;
+    loongarch*)
+        arch="loongarch"
+    ;;
     mips*|IP*)
         case "$arch" in
         *el)
@@ -5079,6 +5085,12 @@  elif enabled bfin; then
 
     cpuflags="-mcpu=$cpu"
 
+elif enabled loongarch; then
+    case $cpu in
+        la464)
+            cpuflags="-march=$cpu"
+        ;;
+    esac
 elif enabled mips; then
 
     if [ "$cpu" != "generic" ]; then
@@ -5335,6 +5347,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