-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Update miniz to 2.1.0 #500
Conversation
Update miniz to the latest version, 2.1.0. This is the stock, amalgated miniz, with a few modifications, forward-ported from the existing diff against 1.5: * Configuration options (the definitions at the top of miniz.h) * Disabling assert(), i.e. defining MZ_ASSERT to nothing * Defining TDEFL_LESS_MEMORY to 1 * Setting TDEFL_LZ_DICT_SIZE = 8*1024 and TDEFL_LZ_CODE_BUF_SIZE = 8 * 1024 An additional complication is that the new miniz performs a long long to integer division, which requires code from libgcc (__ashldi3), which we didn't link to by default (due to -nostdlib). Add -lgcc to LDLIBS. This seems to be a small increase in .text (8018->8023) with the stock toolchain, but with a newer one (gcc 9.2.1/picolibc 1.3) actually results in a decrease (7990->7947). Tested on real hardware (D1 Mini Pro). See espressif#499 for some additional context.
Hi @paravoid , Thanks for this, I hadn't actually noticed that miniz development was continuing on GitHub. I've cherry-picked your commit into our internal review & merge queue, this PR will be updated when it merges. Angus |
Thanks! On that note, a two-parter idea to ease future migrations to newer versions:
|
Update miniz to the latest version, 2.1.0. This is the stock, amalgated miniz, with a few modifications, forward-ported from the existing diff against 1.5: * Configuration options (the definitions at the top of miniz.h) * Disabling assert(), i.e. defining MZ_ASSERT to nothing * Defining TDEFL_LESS_MEMORY to 1 * Setting TDEFL_LZ_DICT_SIZE = 8*1024 and TDEFL_LZ_CODE_BUF_SIZE = 8 * 1024 An additional complication is that the new miniz performs a long long to integer division, which requires code from libgcc (__ashldi3), which we didn't link to by default (due to -nostdlib). Add -lgcc to LDLIBS. This seems to be a small increase in .text (8018->8023) with the stock toolchain, but with a newer one (gcc 9.2.1/picolibc 1.3) actually results in a decrease (7990->7947). Tested on real hardware (D1 Mini Pro). See #499 for some additional context. Merges #500
@paravoid Just saw your suggestions. Agree these sound good, making miniz into a submodule or something would be a nice cleanup. Will see what I can do. |
Update miniz to the latest version, 2.1.0. This is the stock, amalgated miniz, with a few modifications, forward-ported from the existing diff against 1.5: * Configuration options (the definitions at the top of miniz.h) * Disabling assert(), i.e. defining MZ_ASSERT to nothing * Defining TDEFL_LESS_MEMORY to 1 * Setting TDEFL_LZ_DICT_SIZE = 8*1024 and TDEFL_LZ_CODE_BUF_SIZE = 8 * 1024 An additional complication is that the new miniz performs a long long to integer division, which requires code from libgcc (__ashldi3), which we didn't link to by default (due to -nostdlib). Add -lgcc to LDLIBS. This seems to be a small increase in .text (8018->8023) with the stock toolchain, but with a newer one (gcc 9.2.1/picolibc 1.3) actually results in a decrease (7990->7947). Tested on real hardware (D1 Mini Pro). See #499 for some additional context. Merges espressif/esptool#500
Update miniz to the latest version, 2.1.0. This is the stock, amalgated
miniz, with a few modifications, forward-ported from the existing diff
against 1.5:
An additional complication is that the new miniz performs a long long to
integer division, which requires code from libgcc (__ashldi3), which we
didn't link to by default (due to -nostdlib). Add -lgcc to LDLIBS.
This seems to be a small increase in .text (8018->8023) with the stock
toolchain, but with a newer one (gcc 9.2.1/picolibc 1.3) actually
results in a decrease (7990->7947).
Tested on real hardware (D1 Mini Pro).
See #499 for some additional context.