You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/app-emulation/dosemu/files/dosemu-1.4.1_pre20130107-lt...

28 lines
921 B

'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)