the same arch conversion list as done in the lang/go port itself; add
a comment reminding to keep them in-sync). unbreaks packaging of the
few golang ports that actually build on aarch64.
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.
This requires three changes:
- OpenBSD clang produces __guard_local symbols that are marked as hidden,
which causes problems with the go linker. Workaround this by explicitly
making __guard_local symbols visible when reading in an ELF object.
- OpenBSD clang currently fails to correctly report the compiler runtime
via --print-libgcc-file-name. Workaround this issue by hardcoding it
for the time being.
- The TestCgoConsistentResults test passes successfully outside of ports,
however fails under a ports build. This requires further investigation
but we can just skip the test for now.
Go libraries should be rebuilt on every lang/go update. This change adds
runtime dependency on lang/go for ports with "lib" in MODGO_TYPE, and tunes
PKGSPEC to force dependency on exact version of go.
OK jsing@, "makes sense" sthen@
Go 1.6 pass regress on openbsd/386 and openbsd/amd64. Also stop exporting
environ and __progname from cgo, since these symbols are no longer required
by libc.
sigreturn syscall is going away in future versions of OpenBSD and its
use for Go is already broken due to the trampoline return checks. Instead
just return directly from the signal trampoline (as we have always done
for Go openbsd/amd64).
Also fix a bug in the Go openbsd/386 linker, which results in symbols in
the dynamic symbol table being emitted with a size of zero. With a current
ld.so, this results in symbol mismatch warnings.
Unbreaks the Go port on openbsd/386, however it still fails to pass regress
due to the PT_TLS changes.
https://groups.google.com/forum/#!topic/golang-announce/9eqIHqaWvck
"Go's crypto libraries passed certain parameters unchecked to the
underlying big integer library, possibly leading to extremely
long-running computations, which in turn makes Go programs vulnerable to
remote denial of service attacks. Programs using HTTPS client
certificates or the Go SSH server libraries are both exposed to this
vulnerability.
This is CVE-2016-3959 and was addressed by this change:
https://golang.org/cl/21533
Thanks to David Wong for identifying this issue."