aboutsummaryrefslogtreecommitdiff
path: root/gcc/config/i386/mingw32.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/i386/mingw32.h')
-rw-r--r--gcc/config/i386/mingw32.h13
1 files changed, 12 insertions, 1 deletions
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} \