http://bugs.winehq.org/show_bug.cgi?id=2490
Summary: preloader.c does not compile with -fpie/-fstack- protector Product: Wine Version: CVS Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: wine-loader AssignedTo: wine-bugs@winehq.org ReportedBy: basic@mozdev.org
preloader.c does not compile with -fpie/-fstack-protector since a June checkin with this comment: "Do direct Linux system calls in the preloader to avoid trouble with some broken static libcs."
I get the following error: preloader.c: In function `wld_mmap': preloader.c:237: error: can't find a register in class `BREG' while reloading `asm'
I suppose the assembly code in that file does not work with pie/stack-protector. My gcc compiles with stack-protector by default. If I edit the Makefile and add preloader.o: $(CC) -c -fno-pic -fno-stack-protector $(ALLCFLAGS) -o $@ preloader.c
it will compile and run correctly.