Fix libpng LoongArch LSX undefined symbol in native builds#3630
Closed
mattleibow wants to merge 1 commit into
Closed
Fix libpng LoongArch LSX undefined symbol in native builds#3630mattleibow wants to merge 1 commit into
mattleibow wants to merge 1 commit into
Conversation
Points to mono/skia@3f0b580a09 which adds the missing LoongArch LSX source files to the libpng GN build, fixing undefined symbol errors when building with -Wl,--no-undefined on loongarch64. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Collaborator
Author
|
Closing — folding the submodule update into #3629 instead. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When building libSkiaSharp for loongarch64 with
-Wl,--no-undefined(from #3629), the linker fails:This is a pre-existing latent bug — the loongarch64 cross-compiler defines
__loongarch_sx, causing libpng'spngpriv.hto enablePNG_LOONGARCH_LSX_OPT=1and referencepng_init_filter_functions_lsx(). However, the implementation files were never included in Skia's GN build. Previously this was silently tolerated by the linker; the--no-undefinedflag correctly surfaces it.Fix
Updates the skia submodule to include mono/skia#176, which adds the missing LoongArch LSX source files (
filter_lsx_intrinsics.c,loongarch_lsx_init.c) to the libpng GN build forcurrent_cpu == "loongarch64".Related
--no-undefinedlinker flag PR that exposed this issue