[FFmpeg-devel] [PATCH 2/2] configure: build fix for mips cpu p5600

shivraj.patil at imgtec.com shivraj.patil at imgtec.com
Tue Mar 1 14:11:18 CET 2016


From: Shivraj Patil <shivraj.patil at imgtec.com>

For P5600 mips cpu, cpuflags="-march=p5600" sets mips32r5 by default.
Current configuration sets mips32r2 for p5600 cpu, hence ldflag check results in,
error: '-mips32r2' conflicts with the other architecture options, which specify a mips32r5 processor

Due to above error, mips32r2 gets disabled avoiding necessary msa flag settings, which breaks the build.
To fix this issue, introduced mips32r5 in mips arch list which is more appropriate.

Signed-off-by: Shivraj Patil <shivraj.patil at imgtec.com>
---
 configure |   23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index 3f4a0c7..df9bb74 100755
--- a/configure
+++ b/configure
@@ -1661,6 +1661,7 @@ ARCH_EXT_LIST_ARM="
 ARCH_EXT_LIST_MIPS="
     mipsfpu
     mips32r2
+    mips32r5
     mips64r2
     mips32r6
     mips64r6
@@ -4174,6 +4175,7 @@ elif enabled mips; then
 
     case $cpu in
         24kc)
+            disable mips32r5
             disable mips32r6
             disable mips64r2
             disable mips64r6
@@ -4186,6 +4188,7 @@ elif enabled mips; then
             disable mmi
         ;;
         24kf*)
+            disable mips32r5
             disable mips32r6
             disable mips64r2
             disable mips64r6
@@ -4197,6 +4200,7 @@ elif enabled mips; then
             disable mmi
         ;;
         24kec|34kc|1004kc)
+            disable mips32r5
             disable mips32r6
             disable mips64r2
             disable mips64r6
@@ -4208,6 +4212,7 @@ elif enabled mips; then
             disable mmi
         ;;
         24kef*|34kf*|1004kf*)
+            disable mips32r5
             disable mips32r6
             disable mips64r2
             disable mips64r6
@@ -4218,6 +4223,7 @@ elif enabled mips; then
             disable mmi
         ;;
         74kc)
+            disable mips32r5
             disable mips32r6
             disable mips64r2
             disable mips64r6
@@ -4237,6 +4243,7 @@ elif enabled mips; then
             disable mmi
         ;;
         p5600)
+            disable mips32r2
             disable mips32r6
             disable mips64r2
             disable mips64r6
@@ -4251,6 +4258,7 @@ elif enabled mips; then
         ;;
         i6400)
             disable mips32r2
+            disable mips32r5
             disable mips32r6
             disable mips64r2
             disable mipsdsp
@@ -4265,6 +4273,7 @@ elif enabled mips; then
         ;;
         loongson*)
             disable mips32r2
+            disable mips32r5
             disable mips32r6
             disable mips64r2
             disable mips64r6
@@ -4300,6 +4309,7 @@ elif enabled mips; then
             warn "unknown CPU. Disabling all MIPS optimizations."
             disable mipsfpu
             disable mips32r2
+            disable mips32r5
             disable mips32r6
             disable mips64r2
             disable mips64r6
@@ -5152,14 +5162,21 @@ elif enabled mips; then
             check_inline_asm mips32r6 '"aui $0, $0, 0"' ||
             disable mips32r6
         fi
-        if disabled mips32r6 && enabled mips32r2; then
+        if disabled mips32r6 && enabled mips32r5; then
+            check_ldflags "-mips32r5" &&
+            add_cflags "-mips32r5" &&
+            add_asflags "-mips32r5" &&
+            check_inline_asm mips32r5 '"eretnc"' ||
+            disable mips32r5
+        fi
+        if disabled mips32r6 && disabled mips32r5 && enabled mips32r2; then
             check_ldflags "-mips32r2" &&
             add_cflags "-mips32r2" &&
             add_asflags "-mips32r2" &&
             check_inline_asm mips32r2 '"ext $0, $0, 0, 1"' ||
             disable mips32r2
         fi
-        if disabled mips32r6 && disabled mips32r2; then
+        if disabled mips32r6 && disabled mips32r5 && disabled mips32r2; then
             check_ldflags "-mips32" &&
             add_cflags "-mips32" &&
             add_asflags "-mips32" &&
@@ -5178,7 +5195,7 @@ elif enabled mips; then
     fi
 
     # MSA and DSP support require ISA revision level 2 or greater
-    if enabled mips32r2 || enabled mips64r2 || enabled mips32r6 || enabled mips64r6; then
+    if enabled mips32r2 || enabled mips64r2 || enabled mips32r5 || enabled mips32r6 || enabled mips64r6; then
         # MSA must be used with -mfp64 and -mhard-float
         if enabled mipsfpu; then
             if enabled msa; then
-- 
1.7.9.5



More information about the ffmpeg-devel mailing list