msys2 / MINGW-packages

Package scripts for MinGW-w64 targets to build under MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
2.25k stars 1.21k forks source link

fixed building compiler-rt for 32 bit on clang 7 #4546

Closed revelator closed 2 years ago

revelator commented 5 years ago

basically a 2 liner patch was needed, it builds the 32 bit version now to :). Atm im trying to get the supported sanitizers to build also, but i do have a patch handy for compiler-rt if you want it. want me to upload it here, or check when i do a pull ?.

mati865 commented 5 years ago

Pull requests are the (very) preferred way.

revelator commented 5 years ago

pushed to master.

Alexpux commented 5 years ago

what pushed and where?

revelator commented 5 years ago

thought i pushed it to master branch but on second look i can see its not there so wtf... strangely git did not give me any error about it huh.

my local repository also seems to think its up to date with the patch so even stranger. going to check a few things

revelator commented 5 years ago

ok something odd there first time it accepted the push second time it refused it not accepting my credentials.

also tried uploading the patch here, but the site tells me something has gone horribly wrong.

oscarfv commented 5 years ago

@revelator : In case you never created a PR before, see this guide

https://akrabat.com/the-beginners-guide-to-contributing-to-a-github-project/

revelator commented 5 years ago

Sorry for late reply, my SSD died :S luckily i had my developer folder on another harddrive so i only lost windows. I have several projects on github but none that mirror this one yet, also seems kinda overkill for one patch ?, but ill fork it if nessesary.

0202-compiler-rt-partial-fix.zip

revelator commented 5 years ago

clang is still not happy about bash shells on windows, but it builds quake both 32 and 64 bit ports without problems now if using codeblocks, so the compiler itself seems to be working :). I also tried a C++ port and works fine also.

I have a hunch the reason why it fails when used in a bash shell is that it does not really understand unix paths in its windows configuration.

oscarfv commented 5 years ago

@revelator : here, clang++ on 32 bits crashes when an exception is thrown. Possibly it is related to #4125 and #4543.

It also shows failures when linking a project that uses LLVM (undefined references to LLVM symbols, IIRC).

revelator commented 5 years ago

Cannot say i have that problem, but maybe its because i built it with the older gcc-7.3.0 ?, seems the gcc 8 package has some problems in certain areas like gnat no longer able to bootstrap. So i stuck with the one i knew worked and still had atleast partial support for C++14.

revelator commented 5 years ago

i can also build libc++ as a shared library if i do it by hand. The problem seems to be that libc++ needs some reordering of the libraries it links to. Also it cannot link to plain msvcrt lib it wants atleast msvcrt120 even on mingw64 because it thinks the security check cookie does not exist in earlier incarnations of msvcrt (which btw it does in mingw). With a little reordering and fixups i might be able to make a patch that would allow a shared build of it.

mati865 commented 5 years ago

@revelator it should build fine with Clang PKBGUILD. If something doesn't work you can try with the trunk, there is a huge pile of MinGW patches merged.

revelator commented 5 years ago

interresting, so clang itself can build the shared version ? from PKGBUILD. Guess ill have to force it in the PKGBUILD script since on my machine it defaults to using gcc for everything.

mati865 commented 2 years ago

Not aware of such issue with latest version.