Skip to content
Snippets Groups Projects

sysota: force external linking with clang

Merged Pavel Zhukov requested to merge landgraf/oniro:sysota_clang into kirkstone
When sysota is built with toolchain-clang broken dynamicaly linked
binary file is produced [1] if shared linking (GO_DYNLINK) is disabled.
As the result strip phase of do_packages fails with [2]
Sysota is built with disabled shared linking because of another bug [3]
The problem with stripping can be fixed with specifying external linker
for clang toolchain (by default Go swutched to internal linker on 64bit
arches if -pie has been specified since version 1.15 [4] ).
Limiting this change to clang only to be safe.

[1] **readelf: Error: no .dynamic section in the dynamic segment**

[2] Subprocess output:x86_64-oniro-linux-llvm-strip: error: SHT_STRTAB
        string table section [index 7] is non-null terminated

[3] https://gitlab.eclipse.org/eclipse/oniro-core/sysota/-/issues/7

[4] https://go.dev/doc/go1.15#linker

Fixes: #624
Edited by Pavel Zhukov

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading