mirror of
https://github.com/golang/go
synced 2024-11-25 09:17:57 -07:00
cmd/go: allow to use syso files with cgo
I have C functions implemented in .syso file (rather than .so or inlined in .go file). W/o this change the gcc invocation fails with undefined symbols. R=minux.ma, rsc CC=golang-dev https://golang.org/cl/6352076
This commit is contained in:
parent
8be5e8a419
commit
2f2df2aceb
@ -1576,6 +1576,7 @@ func (b *builder) cgo(p *Package, cgoExe, obj string, gccfiles []string) (outGo,
|
||||
linkobj = append(linkobj, ofile)
|
||||
outObj = append(outObj, ofile)
|
||||
}
|
||||
linkobj = append(linkobj, p.SysoFiles...)
|
||||
dynobj := obj + "_cgo_.o"
|
||||
if goarch == "arm" && goos == "linux" { // we need to use -pie for Linux/ARM to get accurate imported sym
|
||||
cgoLDFLAGS = append(cgoLDFLAGS, "-pie")
|
||||
|
Loading…
Reference in New Issue
Block a user