This PR changes order of ${tmake_eh_file} and ${tmake_thr_file} files in thee target config as the i386/t-seh-eh overrides LIB2ADDEH variable while mingw/t-gthr-win32 ads to it. Also it adds i386/t-slibgcc-mingw which includes __gthr_win32_create/join into shared libgcc exports. This fixes:
aarch64-w64-mingw32/bin/ld: ../src/c++11/.libs/libc++11convenience.a(thread.o):(.rdata$.refptr.__gthr_win32_create[.refptr.__gthr_win32_create]+0x0): undefined reference to `__gthr_win32_create'
aarch64-w64-mingw32/bin/ld: ../src/c++11/.libs/libc++11convenience.a(thread.o):(.rdata$.refptr.__gthr_win32_join[.refptr.__gthr_win32_join]+0x0): undefined reference to `__gthr_win32_join'
This PR changes order of
${tmake_eh_file}
and${tmake_thr_file}
files in thee target config as thei386/t-seh-eh
overridesLIB2ADDEH
variable whilemingw/t-gthr-win32
ads to it. Also it addsi386/t-slibgcc-mingw
which includes__gthr_win32_create/join
into shared libgcc exports. This fixes:when building GCC with shared libgcc enabled.
This fix is needed both for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115083 repro case and build of MinGW toolchain MSYS2 packages.
Tested by https://github.com/Windows-on-ARM-Experiments/msys2-woarm64-build/actions/runs/9645452811 and https://github.com/Windows-on-ARM-Experiments/mingw-woarm64-build/actions/runs/9647377371