52 lines
1.6 KiB
Diff
52 lines
1.6 KiB
Diff
From 2a71fe6ea8de5e412bd45d942cc1634b65ec4f78 Mon Sep 17 00:00:00 2001
|
||
From: Dmitry Kazakov <dimula73@gmail.com>
|
||
Date: Tue, 30 May 2023 21:52:58 +0300
|
||
Subject: [PATCH] Disable ebp_available on android
|
||
|
||
---
|
||
meson.build | 22 ++++++++++++++--------
|
||
1 file changed, 14 insertions(+), 8 deletions(-)
|
||
|
||
diff --git a/meson.build b/meson.build
|
||
index b3f1877346..9942b2d120 100644
|
||
--- a/meson.build
|
||
+++ b/meson.build
|
||
@@ -1922,13 +1922,19 @@ if conf.get('x86') == 1
|
||
endif
|
||
endif
|
||
|
||
- ebp_available = cc.run('''
|
||
- int main() {
|
||
- volatile int i=0;
|
||
- __asm__ volatile ("xorl %%ebp, %%ebp" ::: "%ebp");
|
||
- return i;
|
||
- }
|
||
- ''', name: 'if_ebp_available_this_should_crash')
|
||
+ ebp_available = false
|
||
+
|
||
+ if host_machine.system() != 'android'
|
||
+ ebp_available_test = cc.run('''
|
||
+ int main() {
|
||
+ volatile int i=0;
|
||
+ __asm__ volatile ("xorl %%ebp, %%ebp" ::: "%ebp");
|
||
+ return i;
|
||
+ }
|
||
+ ''', name: 'if_ebp_available_this_should_crash')
|
||
+
|
||
+ ebp_available = ebp_available_test.compiled() and ebp_available_test.returncode() != 0
|
||
+ endif
|
||
|
||
# FFmpeg upstream doesn't know that EBP is always unavailable
|
||
# under Clang if stack realignment is used. This is probably
|
||
@@ -1938,7 +1944,7 @@ if conf.get('x86') == 1
|
||
# See:
|
||
# - https://github.com/android/ndk/issues/693
|
||
# - https://bugs.llvm.org/show_bug.cgi?id=37542
|
||
- conf.set10('ebp_available', conf.get('aligned_stack') == 1 and ebp_available.compiled() and ebp_available.returncode() != 0)
|
||
+ conf.set10('ebp_available', conf.get('aligned_stack') == 1 and ebp_available)
|
||
|
||
asm_inline_checks += [
|
||
['""::"b"(0)', 'ebx_available_1'],
|
||
--
|
||
2.25.1
|
||
|