Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix assembly error in qt5 webengine module with binutils >= 2.41 #21026

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions recipes/qt/5.x.x/conandata.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,27 +77,27 @@
- "https://ftp.fau.de/qtproject/archive/qt/5.15/5.15.7/single/qt-everywhere-opensource-src-5.15.7.tar.xz"
sha256: "8a71986676a3f37a198a9113acedbfd5bc5606a459b6b85816d951458adbe9a0"
patches:
"5.15.11":
- "base_path": "qt5/qtbase"
"patch_file": "patches/aa2a39dea5.diff"

Check warning on line 82 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtbase ^ (line: 81)
- "base_path": "qt5/qtwebengine"
"patch_file": "patches/c72097e.diff"

Check warning on line 84 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtwebengine ^ (line: 83)
- "base_path": "qt5/qttools"
"patch_file": "patches/fix-macdeployqt.diff"

Check warning on line 86 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qttools ^ (line: 85)
- "base_path": "qt5/qtwebengine/src/3rdparty/chromium/v8"
"patch_file": "patches/chromium-v8-missing-constexpr.patch"

Check warning on line 88 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtwebengine/s ... ^ (line: 87)
- "base_path": "qt5/qtwebengine/src/3rdparty"
"patch_file": "patches/chromium-skia-missing-iterator-include.patch"

Check warning on line 90 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtwebengine/s ... ^ (line: 89)
- "base_path": "qt5/qtwebengine/src/3rdparty/chromium/third_party/skia"
"patch_file": "patches/skia-cd397f3.diff"

Check warning on line 92 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtwebengine/s ... ^ (line: 91)
- "base_path": "qt5/qtwebengine/src/3rdparty"
"patch_file": "patches/0001-Find-fontconfig-using-pkg-config.patch"

Check warning on line 94 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtwebengine/s ... ^ (line: 93)
- "base_path": "qt5/qtbase"
"patch_file": "patches/android-backtrace.diff"

Check warning on line 96 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtbase ^ (line: 95)
- "base_path": "qt5/qtbase"
"patch_file": "patches/android-openssl.diff"

Check warning on line 98 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtbase ^ (line: 97)
- "base_path": "qt5/qtbase"
"patch_file": "patches/android-new-ndk.diff"

Check warning on line 100 in recipes/qt/5.x.x/conandata.yml

View workflow job for this annotation

GitHub Actions / Lint changed files (YAML files)

conandata.yml schema warning

Schema outlined in https://github.com/conan-io/conan-center-index/blob/master/docs/adding_packages/conandata_yml_format.md#patches-fields is not followed. required key(s) 'patch_description', 'patch_type' not found in - base_path: qt5/qtbase ^ (line: 99)
- patch_file: "patches/5.15.8-fix-qmake-default-libdirs-apple-clang-15.patch"
base_path: "qt5/qtbase"
patch_description: "Fix qmake build with apple-clang>=15"
Expand All @@ -108,6 +108,11 @@
patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14"
patch_type: "portability"
patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392"
- patch_file: "patches/fix_ffmpeg_assembly_for_binutils_2_41.patch"
base_path: "qt5/qtwebengine/src/3rdparty/chromium/third_party/ffmpeg"
patch_description: "Fix build error with binutils >= 2.41"
patch_type: "portability"
patch_source: "https://trac.ffmpeg.org/ticket/10405"
"5.15.10":
- "base_path": "qt5/qtbase"
"patch_file": "patches/aa2a39dea5.diff"
Expand Down Expand Up @@ -141,6 +146,11 @@
patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14"
patch_type: "portability"
patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392"
- patch_file: "patches/fix_ffmpeg_assembly_for_binutils_2_41.patch"
base_path: "qt5/qtwebengine/src/3rdparty/chromium/third_party/ffmpeg"
patch_description: "Fix build error with binutils >= 2.41"
patch_type: "portability"
patch_source: "https://trac.ffmpeg.org/ticket/10405"
"5.15.9":
- "base_path": "qt5/qtbase"
"patch_file": "patches/aa2a39dea5.diff"
Expand Down Expand Up @@ -174,6 +184,11 @@
patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14"
patch_type: "portability"
patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392"
- patch_file: "patches/fix_ffmpeg_assembly_for_binutils_2_41.patch"
base_path: "qt5/qtwebengine/src/3rdparty/chromium/third_party/ffmpeg"
patch_description: "Fix build error with binutils >= 2.41"
patch_type: "portability"
patch_source: "https://trac.ffmpeg.org/ticket/10405"
"5.15.8":
- patch_file: "patches/aa2a39dea5.diff"
base_path: "qt5/qtbase"
Expand Down Expand Up @@ -207,6 +222,11 @@
patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14"
patch_type: "portability"
patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392"
- patch_file: "patches/fix_ffmpeg_assembly_for_binutils_2_41.patch"
base_path: "qt5/qtwebengine/src/3rdparty/chromium/third_party/ffmpeg"
patch_description: "Fix build error with binutils >= 2.41"
patch_type: "portability"
patch_source: "https://trac.ffmpeg.org/ticket/10405"
"5.15.7":
- patch_file: "patches/337f28c9ab.patch"
base_path: "qt5/qtbase"
Expand Down Expand Up @@ -248,3 +268,8 @@
patch_description: "Fix usage of memory_resource with apple-clang>=15 and deployment target of macOS < 14"
patch_type: "portability"
patch_source: "https://codereview.qt-project.org/c/qt/qtbase/+/482392"
- patch_file: "patches/fix_ffmpeg_assembly_for_binutils_2_41.patch"
base_path: "qt5/qtwebengine/src/3rdparty/chromium/third_party/ffmpeg"
patch_description: "Fix build error with binutils >= 2.41"
patch_type: "portability"
patch_source: "https://trac.ffmpeg.org/ticket/10405"
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
From effadce6c756247ea8bae32dc13bb3e6f464f0eb Mon Sep 17 00:00:00 2001
From: =?utf8?q?R=C3=A9mi=20Denis-Courmont?= <remi@remlab.net>
Date: Sun, 16 Jul 2023 18:18:02 +0300
Subject: [PATCH] avcodec/x86/mathops: clip constants used with shift
instructions within inline assembly

Fixes assembling with binutil as >= 2.41

Signed-off-by: James Almer <jamrial@gmail.com>
---
libavcodec/x86/mathops.h | 26 +++++++++++++++++++++++---
1 file changed, 23 insertions(+), 3 deletions(-)

diff --git a/libavcodec/x86/mathops.h b/libavcodec/x86/mathops.h
index 6298f5ed19..ca7e2dffc1 100644
--- a/libavcodec/x86/mathops.h
+++ b/libavcodec/x86/mathops.h
@@ -35,12 +35,20 @@
static av_always_inline av_const int MULL(int a, int b, unsigned shift)
{
int rt, dummy;
+ if (__builtin_constant_p(shift))
__asm__ (
"imull %3 \n\t"
"shrdl %4, %%edx, %%eax \n\t"
:"=a"(rt), "=d"(dummy)
- :"a"(a), "rm"(b), "ci"((uint8_t)shift)
+ :"a"(a), "rm"(b), "i"(shift & 0x1F)
);
+ else
+ __asm__ (
+ "imull %3 \n\t"
+ "shrdl %4, %%edx, %%eax \n\t"
+ :"=a"(rt), "=d"(dummy)
+ :"a"(a), "rm"(b), "c"((uint8_t)shift)
+ );
return rt;
}

@@ -113,19 +121,31 @@ __asm__ volatile(\
// avoid +32 for shift optimization (gcc should do that ...)
#define NEG_SSR32 NEG_SSR32
static inline int32_t NEG_SSR32( int32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("sarl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("sarl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}

#define NEG_USR32 NEG_USR32
static inline uint32_t NEG_USR32(uint32_t a, int8_t s){
+ if (__builtin_constant_p(s))
__asm__ ("shrl %1, %0\n\t"
: "+r" (a)
- : "ic" ((uint8_t)(-s))
+ : "i" (-s & 0x1F)
);
+ else
+ __asm__ ("shrl %1, %0\n\t"
+ : "+r" (a)
+ : "c" ((uint8_t)(-s))
+ );
return a;
}

--
2.25.1