summaryrefslogtreecommitdiffstats
path: root/win/tcl.m4
diff options
context:
space:
mode:
authormdejong <mdejong>2001-07-06 22:03:11 (GMT)
committermdejong <mdejong>2001-07-06 22:03:11 (GMT)
commitdc3fdc08d25b618303a0bd1adef6823a2b3231cb (patch)
treefef292237dd8e276eb67dbf7ad72e6897e1440e5 /win/tcl.m4
parent1326660cc755c7a7e5b7c542280e421082bd47ae (diff)
downloadtcl-dc3fdc08d25b618303a0bd1adef6823a2b3231cb.zip
tcl-dc3fdc08d25b618303a0bd1adef6823a2b3231cb.tar.gz
tcl-dc3fdc08d25b618303a0bd1adef6823a2b3231cb.tar.bz2
* win/configure: Regen.
* win/tcl.m4 (SC_CONFIG_CFLAGS): Pass -e _WinMain@16 in addition to the -mwindows flag to work around a problem with ld when it incorrectly use main() as the executable entry point when both WinMain() and main() are available.
Diffstat (limited to 'win/tcl.m4')
-rw-r--r--win/tcl.m49
1 files changed, 8 insertions, 1 deletions
diff --git a/win/tcl.m4 b/win/tcl.m4
index 40ba286..add1a55 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -415,8 +415,15 @@ AC_DEFUN(SC_CONFIG_CFLAGS, [
# Specify linker flags depending on the type of app being
# built -- Console vs. Window.
+ #
+ # We need to pass -e _WinMain@16 so that ld will use
+ # WinMain() instead of main() as the entry point. We can't
+ # use autoconf to check for this case since it would need
+ # to run an executable and that does not work when
+ # cross compiling. Remove this -e workaround once we
+ # require a gcc that does not have this bug.
LDFLAGS_CONSOLE="-mconsole ${extra_ldflags}"
- LDFLAGS_WINDOW="-mwindows ${extra_ldflags}"
+ LDFLAGS_WINDOW="-mwindows -e _WinMain@16 ${extra_ldflags}"
else
SHLIB_LD="link -dll -nologo -incremental:no"
SHLIB_LD_LIBS="user32.lib advapi32.lib"