gcc and mno-cygwin tweaks on cygwin/mingw

This commit is contained in:
William S Fulton 2015-01-17 17:25:40 +00:00
commit a57302527a

View file

@ -1144,12 +1144,22 @@ else
fi fi
fi fi
case $host in
*-*-cygwin*)
# TODO: Only use this flag if the compiler supports it, later versions of gcc no longer have it
GCC_MNO_CYGWIN=" -mno-cygwin"
;;
*)
GCC_MNO_CYGWIN=""
;;
esac
# java.exe on Cygwin requires the Windows standard (Pascal) calling convention as it is a normal Windows executable and not a Cygwin built executable # java.exe on Cygwin requires the Windows standard (Pascal) calling convention as it is a normal Windows executable and not a Cygwin built executable
case $host in case $host in
*-*-cygwin* | *-*-mingw*) *-*-cygwin* | *-*-mingw*)
if test "$GCC" = yes; then if test "$GCC" = yes; then
JAVADYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias" JAVADYNAMICLINKING="$GCC_MNO_CYGWIN -mthreads -Wl,--add-stdcall-alias"
JAVACFLAGS="-mno-cygwin -mthreads" JAVACFLAGS="$GCC_MNO_CYGWIN -mthreads"
else else
JAVADYNAMICLINKING="" JAVADYNAMICLINKING=""
JAVACFLAGS="" JAVACFLAGS=""
@ -2032,8 +2042,8 @@ fi
case $host in case $host in
*-*-cygwin* | *-*-mingw*) *-*-cygwin* | *-*-mingw*)
if test "$GCC" = yes; then if test "$GCC" = yes; then
CSHARPDYNAMICLINKING=" -mno-cygwin -mthreads -Wl,--add-stdcall-alias" CSHARPDYNAMICLINKING="$GCC_MNO_CYGWIN -mthreads -Wl,--add-stdcall-alias"
CSHARPCFLAGS="-mno-cygwin -mthreads" CSHARPCFLAGS="$GCC_MNO_CYGWIN -mthreads"
else else
CSHARPDYNAMICLINKING="" CSHARPDYNAMICLINKING=""
CSHARPCFLAGS="" CSHARPCFLAGS=""