https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97815
Bug ID: 97815 Summary: QNX should use thread_file=posix instead of defining THREAD_MODEL_SPEC Product: gcc Version: 11.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: target Assignee: unassigned at gcc dot gnu.org Reporter: redi at gcc dot gnu.org CC: mdaniels at qnx dot com Blocks: 63287 Target Milestone: --- Target: i?86-*-nto-qnx* gcc/config/i386/nto.h has: #undef THREAD_MODEL_SPEC #define THREAD_MODEL_SPEC "posix" It's unnecessary to use the spec hook for this, as there's only a single value. I think this is the right way to do it (untested): diff --git a/gcc/config.gcc b/gcc/config.gcc index 15318b20ce03..5a8c8cbebd72 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -2018,6 +2018,7 @@ i[34567]86-*-lynxos*) i[34567]86-*-nto-qnx*) tm_file="${tm_file} i386/att.h dbxelf.h tm-dwarf2.h elfos.h i386/unix.h i386/nto.h" extra_options="${extra_options} i386/nto.opt" + thread_file=posix gnu_ld=yes gas=yes ;; diff --git a/gcc/config/i386/nto.h b/gcc/config/i386/nto.h index c09c2b17fc05..2335d38ce9f0 100644 --- a/gcc/config/i386/nto.h +++ b/gcc/config/i386/nto.h @@ -36,9 +36,6 @@ along with GCC; see the file COPYING3. If not see } \ while (0) -#undef THREAD_MODEL_SPEC -#define THREAD_MODEL_SPEC "posix" - #ifdef CROSS_DIRECTORY_STRUCTURE #define SYSROOT_SUFFIX_SPEC "x86" #endif Referenced Bugs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63287 [Bug 63287] __STDCPP_THREADS__ is not defined