$NetBSD$ * Part of patchset to build electron on NetBSD * Based on OpenBSD's chromium patches, and FreeBSD's electron patches --- third_party/lzma_sdk/README.chromium.orig 2025-02-24 19:59:26.000000000 +0000 +++ third_party/lzma_sdk/README.chromium @@ -1,25 +1,19 @@ Name: LZMA SDK Short Name: lzma URL: http://www.7-zip.org/sdk.html -Version: 22.01 -Date: 2022-07-15 -License: Public Domain +Version: 24.09 +Date: 2024-12-13 +License: LZMA-SDK-9.22 License File: LICENSE Security Critical: yes Shipped: yes -CPEPrefix: cpe:2.3:a:7-zip:7-zip:22.01:*:*:*:*:*:*:* +CPEPrefix: cpe:2.3:a:7-zip:7-zip:24.09:*:*:*:*:*:*:* Description: -This contains a part of LZMA SDK 22.01. +This contains a part of LZMA SDK 24.09. Local Modifications: -The original code can be found at https://7-zip.org/a/lzma2201.7z. Only parts -of this archive are copied here. More specifically: - -1/ C code required to open 7z archive files and uncompress LZMA -2/ 7za, 7zr, and 7zz executables, if Windows is specified as a target OS. -3/ source code for SfxSetup, a utility for creating self extracting archives -4/ C code required for xz decompression (split into its own static library) +The original code can be found at https://7-zip.org/a/lzma2409.7z. The 7z binaries are installed via a 3pp CIPD package into bin/ if Windows is specified as a target OS in the .gclient file. There are two subdirectories in @@ -39,23 +33,12 @@ binaries. Supported platforms are: extract files. 7zr is "lightweight" and only handles 7zip extensions. 7za can handle a few more. -The patch in chromium.patch was applied to 7zCrc.c, CpuArch.c, LZFind.c and -Sha256.c to disable some ARM code that was failing to build in Android and -Fuschia as well as some of the AVX2 and SSE4 code for Windows. In Fuschia, -`#include ` is not available. In Android builds, `armv8-a+crc` is -not a known target architecture, even when the -march cflag is passed, -specifying the CPU type to use. In Windows, Chromium still supports SSE3, -so it is not be ready to transition to utilizing AVX2 and SSE4, yet. Added -.note.gnu.property section to arm64/7zAsm.s to suppress compiler error requiring -bti. Shortened segment names in Asm/x86/*.asm files to make the builds -deterministic. Resolved include paths as well. - -The patch in chromium_ubsan.patch fixes some undefined behavior, flagged by -UBSan, caused by invalid pointer casts in LZMA SDK. - -The patch in Util/SfxSetup/chromium.patch was applied so that: - -1/ Fix for includes file names, since the original code causes an include - file violation during git cl presubmit. -2/ Extended search range for 7z archive signature to accomodate - increased sfx binary size in debug builds. +The purposes of the patch in chromium.patch are: +1. Extend the search range for 7z archive signature to accomodate increased sfx + binary size in debug builds. +2. Fix undefined behavior in CpuArch.h flagged by UBSan caused by invalid + pointer casts. +3. Shorten segment names in Asm/x86/LzmaDecOpt.asm to make the build + deterministic. +4. Remove files irrelevant to Chromium use. +5. Remove AVX and SSE41 code in LzFind.