* tm.texi (THREAD_MODEL_SPEC): Document it.
* gcc.c (main): Use it.
* config/rs6000/aix43.h (THREAD_MODEL_SPEC): Define it.
* config/rs6000/aix51.h (THREAD_MODEL_SPEC): Likewise.
From-SVN: r42048
+2001-05-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * tm.texi (THREAD_MODEL_SPEC): Document it.
+ * gcc.c (main): Use it.
+ * config/rs6000/aix43.h (THREAD_MODEL_SPEC): Define it.
+ * config/rs6000/aix51.h (THREAD_MODEL_SPEC): Likewise.
+
2001-05-13 Franz Sirl <Franz.Sirl-kernel@lauterbach.com>
* rtl.h (SYMBOL_REF_WEAK): New macro.
%{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
%{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}}"
+/* Since there are separate multilibs for pthreads, determine the
+ thread model based on the command-line arguments. */
+#define THREAD_MODEL_SPEC "%{pthread:posix}%{!pthread:single}"
+
/* AIX 4.3 typedefs ptrdiff_t as "long" while earlier releases used "int". */
#undef PTRDIFF_TYPE
%{pthread:%{pg:gcrt0_r%O%s}%{!pg:%{p:mcrt0_r%O%s}%{!p:crt0_r%O%s}}}\
%{!pthread:%{pg:gcrt0%O%s}%{!pg:%{p:mcrt0%O%s}%{!p:crt0%O%s}}}}}}"
+/* Since there are separate multilibs for pthreads, determine the
+ thread model based on the command-line arguments. */
+#define THREAD_MODEL_SPEC "%{pthread:posix}%{!pthread:single}"
+
/* AIX V5 typedefs ptrdiff_t as "long" while earlier releases used "int". */
#undef PTRDIFF_TYPE
if (verbose_flag)
{
int n;
+ const char *thrmod;
notice ("Configured with: %s\n", configuration_arguments);
- notice ("Thread model: %s\n", thread_model);
+#ifdef THREAD_MODEL_SPEC
+ /* We could have defined THREAD_MODEL_SPEC to "%*" by default,
+ but there's no point in doing all this processing just to get
+ thread_model back. */
+ obstack_init (&obstack);
+ do_spec_1 (THREAD_MODEL_SPEC, 0, thread_model);
+ obstack_1grow (&obstack, '\0');
+ thrmod = obstack_finish (&obstack);
+#else
+ thrmod = thread_model;
+#endif
+
+ notice ("Thread model: %s\n", thrmod);
/* compiler_version is truncated at the first space when initialized
from version string, so truncate version_string at the first space
Do not define this macro if it does not need to do anything.
+@findex THREAD_MODEL_SPEC
+@item THREAD_MODEL_SPEC
+GCC @code{-v} will print the thread model GCC was configured to use.
+However, this doesn't work on platforms that are multilibbed on thread
+models, such as AIX 4.3. On such platforms, define
+@code{THREAD_MODEL_SPEC} such that it evaluates to a string without
+blanks that names one of the recognized thread models. @code{%*}, the
+default value of this macro, will expand to the value of
+@code{thread_file} set in @file{config.gcc}.
+
@findex EXTRA_SPECS
@item EXTRA_SPECS
Define this macro to provide additional specifications to put in the