aboutsummaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorKai Tietz <ktietz@gcc.gnu.org>2011-04-01 16:43:22 +0200
committerKai Tietz <ktietz@gcc.gnu.org>2011-04-01 16:43:22 +0200
commitc04bdac028f5292634f5c02432226934ef7980e4 (patch)
treef4a47a001369eb5cf6ae62193100fdcf56e41ec1 /gcc/config.gcc
parent636b4106f693484fe21032b7acb2d0c3f43fe165 (diff)
downloadgcc-c04bdac028f5292634f5c02432226934ef7980e4.zip
gcc-c04bdac028f5292634f5c02432226934ef7980e4.tar.gz
gcc-c04bdac028f5292634f5c02432226934ef7980e4.tar.bz2
config.gcc (*-*-mingw*): Allow as option the posix threading model.
2011-04-01 Kai Tietz <ktietz@redhat.com> * config.gcc (*-*-mingw*): Allow as option the posix threading model. * config/i386/mingw32.h ( SPEC_PTHREAD1, SPEC_PTHREAD2): New macros defined dependent to TARGET_USE_PTHREAD_BY_DEFAULT definition. (CPP_SPEC): Add pthread/no-pthread handling. (LIB_SPEC): Likewise. * config/i386/mingw-w64.h (CPP_SPEC):Likewise. (LIB_SPEC): Likewise. * config/i386/t-cygming (SHLIB_PTHREAD_CFLAG): New flag to pass -pthread option for shared libgcc build. (SHLIB_PTHREAD_LDFLAG): New option to pass -lpthread for shared libgcc build. * config/i386/t-mingw-pthread: New file. * config/i386/mingw-pthread.h (TARGET_USE_PTHREAD_BY_DEFAULT): New define to enable use of library pthread by default. * config/i386/mingw.opt (pthread): New driver option. (no-pthread): New driver option. * config/i386/cygming.opt: Make sure trailing empty line is retained. * config/i386/mingw-w64.opt: Likewise. From-SVN: r171833
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc14
1 files changed, 11 insertions, 3 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 0d026e7..d40ad44d 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1410,7 +1410,7 @@ i[34567]86-*-cygwin*)
use_gcc_stdint=wrap
;;
i[34567]86-*-mingw* | x86_64-*-mingw*)
- tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/mingw32.h"
+ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
xm_file=i386/xm-mingw32.h
case ${target} in
x86_64-*-* | *-w64-*)
@@ -1420,6 +1420,10 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
*)
;;
esac
+ if test x$enable_threads = xposix ; then
+ tm_file="${tm_file} i386/mingw-pthread.h"
+ fi
+ tm_file="${tm_file} i386/mingw32.h"
# This makes the logic if mingw's or the w64 feature set has to be used
case ${target} in
*-w64-*)
@@ -1488,8 +1492,12 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
use_gcc_stdint=wrap
case ${enable_threads} in
"" | yes | win32) thread_file='win32'
- tmake_file="${tmake_file} i386/t-gthr-win32"
- ;;
+ tmake_file="${tmake_file} i386/t-gthr-win32"
+ ;;
+ posix)
+ thread_file='posix'
+ tmake_file="i386/t-mingw-pthread ${tmake_file}"
+ ;;
esac
case ${target} in
x86_64-*-mingw*)