-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to UPX instead of strip #9
Conversation
Since UPX isn't a standard binary, I wonder whether you could tweak it so that if the UPX command fails, the Makefile continues to run anyway? Should be a trivial change and would mean installing UPX is optional. |
Question: Wouldn't this make debugging it more complicated? |
|
Does UPX strip the binary, if not strip should be ran before applying upx self decompression. (sorry for being slow lately, got a baby at home) |
As far as I could tell from the code, Adplay for DOS already has it's own DEBUG flag, which makes log commands output to files, since outputting to console would mess up the main interface. This should just compress the binary and not alter its inner workings.
Good point, I'll do a test to verify if it makes any difference in binary size. (And congratulations on the baby 👶) |
Did some testing/research, here are the results:
So it does not make much difference overall if strip is used before UPX. UPX manpage actually recommends against using strip, and also sheds some light on why the difference is so small:
|
@Malvineous @mywave82 |
Hoping you can address the first reply (above) to avoid a hard dependency on UPX, then I'm happy to merge |
Updated ✅ Sidenote: |
Makefile already has some minor logic for DEBUG variable, which could be extended to prohibit stripping/compressing the binary if it is set. |
This creates smaller binaries, and seems to be a better option than strip for DJGPP binaries.
See https://www.delorie.com/djgpp/v2faq/faq8_14.html end of the page. Seems a special DJP executable compressor was developed at some point, but development has since shifted to UPX.