gcc 4.3.1, with minor patches
build=host=i686-pc-cygwin
target=i686-pc-mingw32
sys-root setup how I believe is appropriatev
(well, er, um..maybe not, due to later problems, but I don't think that's the
problem here;
there indeed varying declarations of getpagesize)
=>
/obj/gcc.1/i686-pc-cygwin/i686-pc-mingw32/./gcc/xgcc
-B/obj/gcc.1/i686-pc-cygwin
/i686-pc-mingw32/./gcc/
-L/obj/gcc.1/i686-pc-cygwin/i686-pc-mingw32/i686-pc-ming
w32/winsup/mingw
-L/obj/gcc.1/i686-pc-cygwin/i686-pc-mingw32/i686-pc-mingw32/win
sup/w32api/lib -isystem /src/gcc/winsup/mingw/include -isystem
/src/gcc/winsup/w
32api/include -B/usr/local/i686-pc-mingw32/bin/
-B/usr/local/i686-pc-mingw32/lib
/ -isystem /usr/local/i686-pc-mingw32/include -isystem
/usr/local/i686-pc-mingw3
2/sys-include -L/obj/gcc.1/i686-pc-cygwin/i686-pc-mingw32/./ld -O2 -g -g -O2
-I/
src/gcc/gcc/../winsup/w32api/include -O2 -g -g -DIN_GCC
-DCROSS_DIRECTORY_STRU
CTURE -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-
style-definition -isystem ./include -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2
-D__G
CC_FLOAT_NOT_NEEDED -I. -I. -I../.././gcc -I/src/gcc/libgcc
-I/src/gcc/libgcc/
. -I/src/gcc/libgcc/../gcc -I/src/gcc/libgcc/../include -DHAVE_CC_TLS -o
_tramp
oline.o -MT _trampoline.o -MD -MP -MF _trampoline.dep -DL_trampoline -c
/src/gcc
/libgcc/../gcc/libgcc2.c \
/src/gcc/libgcc/../gcc/libgcc2.c:2052: error: conflicting types for 'getpagesize
'
/usr/local/i686-pc-mingw32/sys-root/mingw/include/sys/unistd.h:75: error:
previo
us declaration of 'getpagesize' was here
/src/gcc/libgcc/../gcc/libgcc2.c:2066: warning: no previous prototype for
'mprot
ect'
make[2]: *** [_trampoline.o] Error 1
make[2]: Leaving directory
`/obj/gcc.1/i686-pc-cygwin/i686-pc-mingw32/i686-pc-mi
ngw32/libgcc'
make[1]: *** [all-target-libgcc] Error 2
make[1]: Leaving directory `/obj/gcc.1/i686-pc-cygwin/i686-pc-mingw32'
make: *** [all] Error 2
The two protoypes are
int getpagesize(void)
size_t getpagesize(void)
I can't prove to myself the function is even used, so I'll try #if 0 it.
I do understand the point.
Nested functions generate code on the stack.
The stack might not be executable.
Make the page with the trampoline executable via mprotect/VirtualProtect.
I just don't see where __enable_execute_stack comes from for this target, other
than a no-op.
- Jay