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

sysota: fix static linking with clang


When sysota is built with toolchain-clang broken dynamicaly linked
binary file is produced even if GO_DYNLINK is disabled. This can be
fixed with specifying external linker for clang toolchain (by default Go
swutched to internal linker if -pie has been specified since version
1.15). Limiting this change to clang only to be safe.

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

Fixes: #624

Signed-off-by: default avatarPavel Zhukov <pavel.zhukov@huawei.com>
parent 053b1d44
No related branches found
No related tags found
No related merge requests found
...@@ -19,6 +19,8 @@ GO_DYNLINK:x86 = "" ...@@ -19,6 +19,8 @@ GO_DYNLINK:x86 = ""
GO_DYNLINK:x86-64 = "" GO_DYNLINK:x86-64 = ""
GO_DYNLINK:arm = "" GO_DYNLINK:arm = ""
GO_DYNLINK:aarch64 = "" GO_DYNLINK:aarch64 = ""
GO_LINKMODE:toolchain-clang ?= "-linkmode external"
GO_EXTLDFLAGS:toolchain-clang:append = " -static "
# This package is built with go-mod as well as with make. # 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