summaryrefslogtreecommitdiff
path: root/app-emulation/dosemu/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-11-18 10:15:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-11-18 10:15:03 +0000
commitb284a3168fa91a038925d2ecf5e4791011ea5e7d (patch)
tree16fe44748708acacd909d4e2e160a09a7f6d936a /app-emulation/dosemu/files
parent77398e424e45d9e98c1cef3c43bdadb9d56e81ef (diff)
gentoo resync : 18.11.2019
Diffstat (limited to 'app-emulation/dosemu/files')
-rw-r--r--app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-lto.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-lto.patch b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-lto.patch
new file mode 100644
index 000000000000..730ad4e5d5fd
--- /dev/null
+++ b/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-lto.patch
@@ -0,0 +1,27 @@
+'asmlinkage' macros are supposed to make symbol available
+for calling from inline (or not) assembly.
+
+'static' keyword is not compatible to it and breaks -flto
+when gcc's LTO partitioner separates assembly definitions
+from C definitions. This causes symbol resolution failures:
+
+ ld: /tmp/dosemu.bin.h8Y59G.ltrans0.ltrans.o: in function `stub_rep__':
+ <artificial>:(.text+0xe): undefined reference to `rep_movs_stos'
+
+The changes turns 'asmlinkage' into exported symbol.
+
+https://bugs.gentoo.org/700126
+--- a/src/emu-i386/simx86/cpatch.c
++++ b/src/emu-i386/simx86/cpatch.c
+@@ -37,9 +37,9 @@
+ #include "codegen-arch.h"
+
+ #ifdef __i386__
+-#define asmlinkage static __attribute__((used)) __attribute__((cdecl))
++#define asmlinkage __attribute__((used)) __attribute__((cdecl))
+ #else
+-#define asmlinkage static __attribute__((used))
++#define asmlinkage __attribute__((used))
+ #endif
+
+ int s_munprotect(unsigned int addr)