msys2 / MSYS2-packages

Package scripts for MSYS2.
https://packages.msys2.org
BSD 3-Clause "New" or "Revised" License
1.3k stars 489 forks source link

fix msys/file to determine the correct archive type in import archives #3927

Open GitMensch opened 1 year ago

GitMensch commented 1 year ago

it should be possible to make some code for file.exe to determine the correct archive type in import archives by checking for _imp*symbol in the library (these should not exist in the static ones), it wont be foolprof but better than what is i reckon.

Originally posted by @revelator in https://github.com/msys2/MINGW-packages/discussions/8056#discussioncomment-6540994

revelator commented 1 year ago

maybe make file calling objdump on the library that seems to have been one trick used in the old msys.org days. not so sure about how to force file to do it though ? any thoughts.

GitMensch commented 9 months ago

@Biswa96 Do you think it would be more reasonable to patch file.exe (seems to be quite complex, not sure if there's someone that would do that) or instead "replace" the installed file.exe by a wrapper script that manually inspects *.a (or even *.dll.a) files and pass the rest to the then-renamed file.exe (as per the original discussion)?

Biswa96 commented 9 months ago

I did not understand the issue. Please wait for other to comment.