Skip to content
Snippets Groups Projects
Commit 6b4d14bf authored by Pavel Zhukov's avatar Pavel Zhukov
Browse files

sysota: force external linking with clang

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] sysota#7

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



Fixes: #624

Signed-off-by: default avatarPavel Zhukov <pavel.zhukov@huawei.com>
parent 93960c5f
No related branches found
No related tags found
1 merge request!2default.xml: Switch back to development post alpha
......@@ -19,6 +19,7 @@ GO_DYNLINK:x86 = ""
GO_DYNLINK:x86-64 = ""
GO_DYNLINK:arm = ""
GO_DYNLINK:aarch64 = ""
GO_LINKMODE:toolchain-clang ?= "-linkmode external"
# This package is built with go-mod as well as with make.
#
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment