CVSROOT: /cvs Module name: ports Changes by: js...@cvs.openbsd.org 2019/01/05 05:59:25
Modified files: lang/go : Makefile Added files: lang/go/patches: patch-src_cmd_link_internal_ld_lib_go patch-src_cmd_link_internal_loadelf_ldelf_go Log message: Allow weak symbols to be duplicated when already defined. When -mretpoline is enabled with clang, a __llvm_retpoline_r11 weak symbol is emitted in each compilation unit. This results in the Go linker complaining when processing a package archive that contains cgo linkages, since it finds the same weak symbol defined in multiple object files. Relax the duplicate symbol detection such that weak symbols are permitted to be duplicated. This makes it possible to build Go with clang again and addresses a similar duplicate weak symbol issue that results from retguard. Also backport an upstream commit that corrects the handling of libgcc vs libcompiler_rt. Combined with the above fix `make regress` now passes with both gcc and clang.