aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/config.gcc3
-rw-r--r--gcc/config.in10
-rw-r--r--gcc/config/i386/mingw-mcfgthread.h1
-rw-r--r--gcc/config/i386/mingw32.h13
-rwxr-xr-xgcc/configure2
-rw-r--r--gcc/configure.ac2
6 files changed, 24 insertions, 7 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc
index 2af30b4..2fbf2e6 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -2096,6 +2096,9 @@ i[34567]86-*-mingw* | x86_64-*-mingw*)
if test x$enable_threads = xposix ; then
tm_file="${tm_file} i386/mingw-pthread.h"
fi
+ if test x$enable_threads = xmcf ; then
+ tm_file="${tm_file} i386/mingw-mcfgthread.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
diff --git a/gcc/config.in b/gcc/config.in
index cc217b9..5e41748 100644
--- a/gcc/config.in
+++ b/gcc/config.in
@@ -1451,6 +1451,12 @@
#endif
+/* Define to 1 if you have the `getauxval' function. */
+#ifndef USED_FOR_TARGET
+#undef HAVE_GETAUXVAL
+#endif
+
+
/* Define to 1 if you have the `getchar_unlocked' function. */
#ifndef USED_FOR_TARGET
#undef HAVE_GETCHAR_UNLOCKED
@@ -2678,7 +2684,3 @@
#undef vfork
#endif
-/* Define to 1 if you have the `getauxval' function. */
-#ifndef USED_FOR_TARGET
-#undef HAVE_GETAUXVAL
-#endif
diff --git a/gcc/config/i386/mingw-mcfgthread.h b/gcc/config/i386/mingw-mcfgthread.h
new file mode 100644
index 0000000..7d4eda3
--- /dev/null
+++ b/gcc/config/i386/mingw-mcfgthread.h
@@ -0,0 +1 @@
+#define TARGET_USING_MCFGTHREAD 1
diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
index d3ca0cd..b5f31c3 100644
--- a/gcc/config/i386/mingw32.h
+++ b/gcc/config/i386/mingw32.h
@@ -32,6 +32,10 @@ along with GCC; see the file COPYING3. If not see
| MASK_STACK_PROBE | MASK_ALIGN_DOUBLE \
| MASK_MS_BITFIELD_LAYOUT)
+#ifndef TARGET_USING_MCFGTHREAD
+#define TARGET_USING_MCFGTHREAD 0
+#endif
+
/* See i386/crtdll.h for an alternative definition. _INTEGRAL_MAX_BITS
is for compatibility with native compiler. */
#define EXTRA_OS_CPP_BUILTINS() \
@@ -50,6 +54,8 @@ along with GCC; see the file COPYING3. If not see
builtin_define_std ("WIN64"); \
builtin_define ("_WIN64"); \
} \
+ if (TARGET_USING_MCFGTHREAD) \
+ builtin_define ("__USING_MCFGTHREAD__"); \
} \
while (0)
@@ -181,11 +187,16 @@ along with GCC; see the file COPYING3. If not see
#else
#define SHARED_LIBGCC_SPEC " -lgcc "
#endif
+#if TARGET_USING_MCFGTHREAD
+#define MCFGTHREAD_SPEC " -lmcfgthread -lkernel32 -lntdll "
+#else
+#define MCFGTHREAD_SPEC ""
+#endif
#undef REAL_LIBGCC_SPEC
#define REAL_LIBGCC_SPEC \
"%{mthreads:-lmingwthrd} -lmingw32 \
" SHARED_LIBGCC_SPEC " \
- -lmoldname -lmingwex -lmsvcrt -lkernel32"
+ -lmoldname -lmingwex -lmsvcrt -lkernel32 " MCFGTHREAD_SPEC
#undef STARTFILE_SPEC
#define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
diff --git a/gcc/configure b/gcc/configure
index 99ba76522..2ce51a8 100755
--- a/gcc/configure
+++ b/gcc/configure
@@ -12900,7 +12900,7 @@ case ${enable_threads} in
target_thread_file='single'
;;
aix | dce | lynx | mipssde | posix | rtems | \
- single | tpf | vxworks | win32)
+ single | tpf | vxworks | win32 | mcf)
target_thread_file=${enable_threads}
;;
*)
diff --git a/gcc/configure.ac b/gcc/configure.ac
index e48fcbf..e1ef2ec 100644
--- a/gcc/configure.ac
+++ b/gcc/configure.ac
@@ -1991,7 +1991,7 @@ case ${enable_threads} in
target_thread_file='single'
;;
aix | dce | lynx | mipssde | posix | rtems | \
- single | tpf | vxworks | win32)
+ single | tpf | vxworks | win32 | mcf)
target_thread_file=${enable_threads}
;;
*)