File avidemux-cpu-detection-fix.patch of Package avidemux3 (Revision d492f79db003dd4fc9908b53440d55b9)
Currently displaying revision d492f79db003dd4fc9908b53440d55b9 , Show latest
53
1
From: Jiri Slaby <jslaby@suse.cz>
2
Date: Tue, 12 Nov 2019 11:28:37 +0100
3
Subject: cmake: fix detection of CPUs
4
Patch-mainline: yes
5
Git-commit: 82ab993cbbe17c71ca20c4af7b1a4b6f9fa95c45
6
References: build fix
7
8
The code defines a function foo returning int, but contains no return.
9
So the detection fails with "CPU not supported". As new gccs warng abotu
10
missing return, it causes the detaction to fail. Switch foo to return
11
void.
12
13
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
14
---
15
cmake/cmake_compile_check/cpu_armel_check.cpp | 2 +-
16
cmake/cmake_compile_check/cpu_x86-64_check.cpp | 2 +-
17
cmake/cmake_compile_check/cpu_x86_check.cpp | 2 +-
18
3 files changed, 3 insertions(+), 3 deletions(-)
19
20
diff --git a/cmake/cmake_compile_check/cpu_armel_check.cpp b/cmake/cmake_compile_check/cpu_armel_check.cpp
21
index 429661add08c..02f779c71b7b 100644
22
--- a/cmake/cmake_compile_check/cpu_armel_check.cpp
23
+++ b/cmake/cmake_compile_check/cpu_armel_check.cpp
24
25
-int foo(void)
26
+void foo(void)
27
{
28
29
asm volatile ("mov lr,pc " : : );
30
diff --git a/cmake/cmake_compile_check/cpu_x86-64_check.cpp b/cmake/cmake_compile_check/cpu_x86-64_check.cpp
31
index 49c751b6fbe8..4f493bc5cdaf 100644
32
--- a/cmake/cmake_compile_check/cpu_x86-64_check.cpp
33
+++ b/cmake/cmake_compile_check/cpu_x86-64_check.cpp
34
35
-int foo(void)
36
+void foo(void)
37
{
38
asm volatile ("movdqa %xmm8, 0");
39
}
40
diff --git a/cmake/cmake_compile_check/cpu_x86_check.cpp b/cmake/cmake_compile_check/cpu_x86_check.cpp
41
index c4e8f7f432a5..cd00b66c0524 100644
42
--- a/cmake/cmake_compile_check/cpu_x86_check.cpp
43
+++ b/cmake/cmake_compile_check/cpu_x86_check.cpp
44
45
-int foo(void)
46
+void foo(void)
47
{
48
asm volatile ("movdqa %xmm7, 0");
49
}
50
--
51
2.24.0
52
53