On 14.05.2026 06:13, Andrew Pinski wrote:
On Thu, May 7, 2026 at 5:57 PM BtbN <[email protected]> wrote:

---
  gcc/config.gcc | 3 +++
  1 file changed, 3 insertions(+)

diff --git a/gcc/config.gcc b/gcc/config.gcc
index d62eb162934..90f693be5e1 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1320,6 +1320,9 @@ aarch64-*-mingw*)
         tm_file="${tm_file} aarch64/aarch64-abi-ms.h"
         tm_file="${tm_file} aarch64/aarch64-coff.h"
         tm_file="${tm_file} aarch64/cygming.h"
+       if test x$enable_threads = xposix ; then
+               tm_file="${tm_file} i386/mingw-pthread.h"
+       fi



This is similar to `i[34567]86-*-mingw* | x86_64-*-mingw*)` stance but
then i386/mingw-pthread.h becomes a common header file so it is better
to move it up to the mingw directory (like the other common ones) and
fixup x86 stance too.
Even though this patch is small enough to be considered as legal an
insignificant change, it would be a good idea to decide if you are
contributing this with a DCO or sign a copy right assignment if you
are going to further contribute.

v2 has a proper sign-of now.

See https://gcc.gnu.org/contribute.html#legal and https://gcc.gnu.org/dco.html .
Also it would be a good idea to add a changelog entry for this change.
See https://gcc.gnu.org/contribute.html#patches for that part.

Done, see v2.

The only other question I have is are we going to support mcf
threading too for aarch64?
if so it might make sense to handle that with pthread here too.

I added it in v2.
Can't easily test it, but it'll definitely be necessary just like with winpthreads.

Thanks,
Andrea


         tm_file="${tm_file} mingw/mingw32.h"
         tm_file="${tm_file} mingw/mingw-stdint.h"
         tm_file="${tm_file} mingw/winnt.h"
--
2.52.0


Attachment: OpenPGP_0xD85AAA6874B7507E.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to