diff options
| author | rmathew <rmathew@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-05 02:15:51 +0000 |
|---|---|---|
| committer | rmathew <rmathew@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-07-05 02:15:51 +0000 |
| commit | 621f785f3df099453294bb6ea97b9896ff45e77c (patch) | |
| tree | 0a98e27f40c056a0c593499932dea332859cbd04 /libjava/configure.ac | |
| parent | d03ad30f9009d648232ad5db3fe7f9a66d9e881f (diff) | |
| download | ppe42-gcc-621f785f3df099453294bb6ea97b9896ff45e77c.tar.gz ppe42-gcc-621f785f3df099453294bb6ea97b9896ff45e77c.zip | |
* libgcj.spec.in: Use THREADSTARTFILESPEC to affect the spec for
startfile.
* configure.ac: Allow targets to affect the spec for startfile
by specifying a THREADSTARTFILESPEC variable. Define this for
the win32 threads package to include crtmt.o.
* configure: Regenerate.
* win32.cc (_CRT_MT): Remove definition.
(__mingwthr_key_dtor): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115196 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/configure.ac')
| -rw-r--r-- | libjava/configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/libjava/configure.ac b/libjava/configure.ac index 7dcbe88daf6..fab02646701 100644 --- a/libjava/configure.ac +++ b/libjava/configure.ac @@ -783,6 +783,7 @@ THREADINCS= THREADDEPS= THREADH= THREADSPEC= +THREADSTARTFILESPEC= case "$THREADS" in posix) case "$host" in @@ -834,6 +835,20 @@ case "$THREADS" in win32) THREADH=win32-threads.h + THREADCXXFLAGS=-mthreads + # We need thread-safe exception handling so _CRT_MT should be set to 1. + # But we do not want the executables created to be dependent on + # mingwm10.dll which provides a __mingwthr_key_dtor() that cleans up + # exception handling contexts. The following kludge achieves this effect + # and causes a dummy __mingwthr_key_dtor() to be linked in from + # libmingw32.a. This causes a memory leak of about 24 bytes per thread. + # A workaround is to explicitly use -mthreads while linking Java programs. + # See PR libgcj/28263. + # + # FIXME: In Java we are able to detect thread death at the end of + # Thread.run() so we should be able to clean up the exception handling + # contexts ourselves. + THREADSTARTFILESPEC='crtmt%O%s' ;; none) @@ -845,6 +860,7 @@ AC_SUBST(THREADLIBS) AC_SUBST(THREADINCS) AC_SUBST(THREADDEPS) AC_SUBST(THREADSPEC) +AC_SUBST(THREADSTARTFILESPEC) AC_SUBST(THREADLDFLAGS) AC_SUBST(THREADCXXFLAGS) AM_CONDITIONAL(USING_POSIX_THREADS, test "$THREADS" = posix) |

