diff options
Diffstat (limited to 'meta-multimedia/recipes-multimedia/openh264/openh264/0002-Makefile-add-possibility-to-disable-NEON-extension.patch')
-rw-r--r-- | meta-multimedia/recipes-multimedia/openh264/openh264/0002-Makefile-add-possibility-to-disable-NEON-extension.patch | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/meta-multimedia/recipes-multimedia/openh264/openh264/0002-Makefile-add-possibility-to-disable-NEON-extension.patch b/meta-multimedia/recipes-multimedia/openh264/openh264/0002-Makefile-add-possibility-to-disable-NEON-extension.patch new file mode 100644 index 000000000..298ac1c01 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/openh264/openh264/0002-Makefile-add-possibility-to-disable-NEON-extension.patch | |||
@@ -0,0 +1,103 @@ | |||
1 | From bc3a3baeaccfe9c1286848b348baf92dfbd05346 Mon Sep 17 00:00:00 2001 | ||
2 | From: Benjamin Bara <benjamin.bara@skidata.com> | ||
3 | Date: Thu, 31 Aug 2023 09:27:31 +0200 | ||
4 | Subject: [PATCH 2/2] Makefile: add possibility to disable NEON extension | ||
5 | |||
6 | README states that the NEON extension is optional. However, currently it | ||
7 | cannot be turned off, therefore add an option to disable it. | ||
8 | |||
9 | Upstream-Status: Submitted [https://github.com/cisco/openh264/pull/3679] | ||
10 | Signed-off-by: Benjamin Bara <benjamin.bara@skidata.com> | ||
11 | --- | ||
12 | Makefile | 1 + | ||
13 | build/arch.mk | 4 ++++ | ||
14 | build/msvc-common.mk | 10 ++++++++-- | ||
15 | build/platform-mingw_nt.mk | 5 ++++- | ||
16 | 4 files changed, 17 insertions(+), 3 deletions(-) | ||
17 | |||
18 | diff --git a/Makefile b/Makefile | ||
19 | index baed53a7..cc22c4aa 100644 | ||
20 | --- a/Makefile | ||
21 | +++ b/Makefile | ||
22 | @@ -35,6 +35,7 @@ CCASFLAGS=$(CFLAGS) | ||
23 | STATIC_LDFLAGS=-lstdc++ | ||
24 | STRIP ?= strip | ||
25 | USE_STACK_PROTECTOR = Yes | ||
26 | +USE_NEON=Yes | ||
27 | |||
28 | SHAREDLIB_MAJORVERSION=7 | ||
29 | FULL_VERSION := 2.3.1 | ||
30 | diff --git a/build/arch.mk b/build/arch.mk | ||
31 | index 4e1538c4..fd6a81e4 100644 | ||
32 | --- a/build/arch.mk | ||
33 | +++ b/build/arch.mk | ||
34 | @@ -17,18 +17,22 @@ ifneq ($(filter-out arm64 arm64e, $(filter arm%, $(ARCH))),) | ||
35 | ifeq ($(USE_ASM), Yes) | ||
36 | ASM_ARCH = arm | ||
37 | ASMFLAGS += -I$(SRC_PATH)codec/common/arm/ | ||
38 | +ifeq ($(USE_NEON), Yes) | ||
39 | CFLAGS += -DHAVE_NEON | ||
40 | endif | ||
41 | endif | ||
42 | +endif | ||
43 | |||
44 | #for arm64 | ||
45 | ifneq ($(filter arm64 aarch64 arm64e, $(ARCH)),) | ||
46 | ifeq ($(USE_ASM), Yes) | ||
47 | ASM_ARCH = arm64 | ||
48 | ASMFLAGS += -I$(SRC_PATH)codec/common/arm64/ | ||
49 | +ifeq ($(USE_NEON), Yes) | ||
50 | CFLAGS += -DHAVE_NEON_AARCH64 | ||
51 | endif | ||
52 | endif | ||
53 | +endif | ||
54 | |||
55 | #for mips | ||
56 | ifneq ($(filter mips mips64, $(ARCH)),) | ||
57 | diff --git a/build/msvc-common.mk b/build/msvc-common.mk | ||
58 | index 5891ea4e..5a1e2582 100644 | ||
59 | --- a/build/msvc-common.mk | ||
60 | +++ b/build/msvc-common.mk | ||
61 | @@ -10,7 +10,10 @@ else | ||
62 | endif | ||
63 | ifeq ($(ASM_ARCH), arm) | ||
64 | CCAS = gas-preprocessor.pl -as-type armasm -force-thumb -- armasm | ||
65 | -CCASFLAGS = -nologo -DHAVE_NEON -ignore 4509 | ||
66 | +CCASFLAGS = -nologo -ignore 4509 | ||
67 | +ifeq ($(USE_NEON), Yes) | ||
68 | +CCASFLAGS += -DHAVE_NEON | ||
69 | +endif | ||
70 | endif | ||
71 | |||
72 | CC=cl | ||
73 | @@ -20,7 +23,10 @@ CXX_O=-Fo$@ | ||
74 | |||
75 | ifeq ($(ASM_ARCH), arm64) | ||
76 | CCAS = clang-cl | ||
77 | -CCASFLAGS = -nologo -DHAVE_NEON_AARCH64 --target=arm64-windows | ||
78 | +CCASFLAGS = -nologo --target=arm64-windows | ||
79 | +ifeq ($(USE_NEON), Yes) | ||
80 | +CCASFLAGS += -DHAVE_NEON_AARCH64 | ||
81 | +endif | ||
82 | endif | ||
83 | |||
84 | |||
85 | diff --git a/build/platform-mingw_nt.mk b/build/platform-mingw_nt.mk | ||
86 | index b7a5495d..d73e362a 100644 | ||
87 | --- a/build/platform-mingw_nt.mk | ||
88 | +++ b/build/platform-mingw_nt.mk | ||
89 | @@ -17,7 +17,10 @@ endif | ||
90 | endif | ||
91 | ifeq ($(ASM_ARCH), arm) | ||
92 | CCAS = gas-preprocessor.pl -as-type clang -force-thumb -- $(CC) | ||
93 | -CCASFLAGS = -DHAVE_NEON -mimplicit-it=always | ||
94 | +CCASFLAGS = -mimplicit-it=always | ||
95 | +ifeq ($(USE_NEON), Yes) | ||
96 | +CCASFLAGS += -DHAVE_NEON | ||
97 | +endif | ||
98 | endif | ||
99 | EXEEXT = .exe | ||
100 | |||
101 | -- | ||
102 | 2.34.1 | ||
103 | |||