Skip to content
Snippets Groups Projects

sysota: force external linking with clang

Merged Pavel Zhukov requested to merge landgraf/oniro:sysota_clang into kirkstone
1 file
+ 2
0
Compare changes
  • Side-by-side
  • Inline
  • 42c39d9d
    sysota: fix static linking with clang · 42c39d9d
    Pavel Zhukov authored
    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>
@@ -19,6 +19,8 @@ GO_DYNLINK:x86 = ""
GO_DYNLINK:x86-64 = ""
GO_DYNLINK:arm = ""
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.
#
Loading