https://bugs.winehq.org/show_bug.cgi?id=37540
--- Comment #14 from Austin English austinenglish@gmail.com --- (In reply to Michael Weiser from comment #11)
Hi,
I tried re-compiling with -fno-PIC and -mcmodel=large using osxwinebuilder but get a relocation error on linking libwine.1.dylib:
You shouldn't need -mcmodel=large, as wine64 doesn't work on OSX.
ld: illegal text-relocation to '_dlldir' in config.o from '_get_dlldir' in config.o for architecture i386
I guess, OS X doesn't like no-PIC dynamic libs. For -mdynamic-no-pic it's explicitly documented in the man page - and clang even crashes when trying to compile wine using it.
Is there a Mac expert around who could help me out?
I'm not an expert, but I do have google and a mac mini ;).
I made an basic patch for this and tested on Linux, then Mac. With mac, I see a similar error to you. I found posts suggesting -read_only_relocs suppress in LDFLAGS, so I tried that, but noticed the same failure. Then I found this on GMP's site:
A non-pic build using the 32-bit ABI on X86 provokes a linker bug. It is triggered by even a trivial hello.c program
@Ken, any suggestions? I'll attach my draft patch.