jmeubank / tdm-gcc

TDM-GCC is a cleverly disguised GCC compiler for Windows!
https://jmeubank.github.io/tdm-gcc/
572 stars 49 forks source link

Role of libgcc_eh.a replaced by libgcc.a #47

Closed cosing closed 1 year ago

cosing commented 2 years ago

This results in TDM and clang not working together in Windows(clang --target=x86_64-w64-mingw) I had to repackage using ar.exe Is this normal? or I don't have my clang configured properly

revelator commented 2 years ago

had to patch out libgcc_eh from clang myself, works fine after :)

revelator commented 2 years ago

btw while clang itself builds fine linked to the static runtimes libc++ and friends will not. these need to be built with -shared-libgc -shared-libstdc++ in LDFLAGS. Sadly rust is one thing that cannot be built with TDM because it relies heavily on libgcc_eh.

revelator commented 2 years ago

0106-tdm-sjlj.zip

here is the patch for clang-14.0 need to add LDFLAGS+=" -shared-libgcc -shared-libstdc++" when building it. works just fine after that.

revelator commented 1 year ago

clang needs the shared runtimes hence the LDFLAGS+=" -shared-libgcc -shared-libstdc++" it cannot be built without them unless someone hacks it together (hint hard as hell to do because cmake does not think static runtimes can throw exceptions).