Skip to content
  • Pavel Zhukov's avatar
    83253fa5
    sysota: force external linking with clang · 83253fa5
    Pavel Zhukov authored
    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] eclipse/oniro-core/sysota#7
    
    [4] https://go.dev/doc/go1.15#linker
    
    
    
    Fixes: #624
    
    Signed-off-by: default avatarPavel Zhukov <pavel.zhukov@huawei.com>
    83253fa5
    sysota: force external linking with clang
    Pavel Zhukov authored
    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] eclipse/oniro-core/sysota#7
    
    [4] https://go.dev/doc/go1.15#linker
    
    
    
    Fixes: #624
    
    Signed-off-by: default avatarPavel Zhukov <pavel.zhukov@huawei.com>
Loading