In any case, I'm trying to compile the latest wineasio 0.90 on OSX 10.6.8. I have already built wine 1.5.4.
I get some errors immediately related to some ELF assembler code injection that I believe has to do with working around COM. Here is the error and below that is the code I think causing the problem to build. Does anyone have any ideas what I would need to tweak to get past this particular problem?
Code: Select all
gcc -c -I. -I/usr/include -I/Users/sjs/wine/wine-1.5.4/include -I/Users/sjs/wine/wine-1.5.4/include/wine -I/Users/sjs/wine/wine-1.5.4/include/wine/windows -m32 -g -O2 -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -o asio.o asio.c
{standard input}:36:Unknown pseudo-op: .type
{standard input}:36:Rest of line ignored. 1st junk character valued 95 (_).
{standard input}:38:Unknown pseudo-op: .cfi_startproc
{standard input}:43:Unknown pseudo-op: .cfi_endproc
{standard input}:44:Unknown pseudo-op: .previous
{standard input}:48:Unknown pseudo-op: .type
Code: Select all
/* ASIO drivers (breaking the COM specification) use the Microsoft variety of
* thiscall calling convention which gcc is unable to produce. These macros
* add an extra layer to fixup the registers. Borrowed from config.h and the
* wine source code.
*/
/* From config.h */
#define __ASM_DEFINE_FUNC(name,suffix,code) asm(".text\n\t.align 4\n\t.globl " #name suffix "\n\t.type " #name suffix ",@function\n" #name suffix ":\n\t.cfi_startproc\n\t" code "\n\t.cfi_endproc\n\t.previous");
#define __ASM_GLOBAL_FUNC(name,code) __ASM_DEFINE_FUNC(name,"",code)
#define __ASM_NAME(name) name
#define __ASM_STDCALL(args) ""
/* From wine source */
#ifdef __i386__ /* thiscall functions are i386-specific */
#define THISCALL(func) __thiscall_ ## func
#define THISCALL_NAME(func) __ASM_NAME("__thiscall_" #func)
#define __thiscall __stdcall
#define DEFINE_THISCALL_WRAPPER(func,args) \
extern void THISCALL(func)(void); \
__ASM_GLOBAL_FUNC(__thiscall_ ## func, \
"popl %eax\n\t" \
"pushl %ecx\n\t" \
"pushl %eax\n\t" \
"jmp " __ASM_NAME(#func) __ASM_STDCALL(args) )
#else /* __i386__ */
#define THISCALL(func) func
#define THISCALL_NAME(func) __ASM_NAME(#func)
#define __thiscall __cdecl
#define DEFINE_THISCALL_WRAPPER(func,args) /* nothing */
#endif /* __i386__ */
/* Hide ELF symbols for the COM members - No need to to export them */
#define HIDDEN __attribute__ ((visibility("hidden")))