diff options
Diffstat (limited to 'debian/patches/0001-Fix-versioned-symbol-aliases-when-used-with-link-tim.patch')
-rw-r--r-- | debian/patches/0001-Fix-versioned-symbol-aliases-when-used-with-link-tim.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/0001-Fix-versioned-symbol-aliases-when-used-with-link-tim.patch b/debian/patches/0001-Fix-versioned-symbol-aliases-when-used-with-link-tim.patch new file mode 100644 index 0000000..5e7c891 --- /dev/null +++ b/debian/patches/0001-Fix-versioned-symbol-aliases-when-used-with-link-tim.patch @@ -0,0 +1,33 @@ +From 2d16e3a7875a9cb5abd60713bb2e39b536a7dec4 Mon Sep 17 00:00:00 2001 +From: Martin Mares <mj@ucw.cz> +Date: Wed, 28 Dec 2022 13:48:47 +0100 +Origin: upstream, commit:2d16e3a7875a9cb5abd60713bb2e39b536a7dec4 +Subject: [PATCH] Fix versioned symbol aliases when used with link-time + optimization + +--- + lib/internal.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/internal.h b/lib/internal.h +index ed0e94f..e9e413e 100644 +--- a/lib/internal.h ++++ b/lib/internal.h +@@ -15,12 +15,12 @@ + // optimizations is happy to optimize them away, leading to linker failures. + #define VERSIONED_ABI __attribute__((used)) PCI_ABI + #ifdef __APPLE__ +-#define STATIC_ALIAS(_decl, _for) _decl PCI_ABI { return _for; } ++#define STATIC_ALIAS(_decl, _for) _decl VERSIONED_ABI { return _for; } + #define DEFINE_ALIAS(_decl, _for) + #define SYMBOL_VERSION(_int, _ext) + #else + #define STATIC_ALIAS(_decl, _for) +-#define DEFINE_ALIAS(_decl, _for) extern _decl __attribute__((alias(#_for))) ++#define DEFINE_ALIAS(_decl, _for) extern _decl __attribute__((alias(#_for))) VERSIONED_ABI + #ifdef _WIN32 + /* GCC does not support asm .symver directive for Windows targets, so define new external global function symbol as alias to internal symbol */ + #define SYMBOL_VERSION(_int, _ext) asm(".globl\t" PCI_STRINGIFY(__MINGW_USYMBOL(_ext)) "\n\t" \ +-- +2.39.0 + |