diff options
| author | Aulus Egnatius Varialus <varialus@gmail.com> | 2013-09-04 15:19:21 -0700 |
|---|---|---|
| committer | Ian Lance Taylor <iant@golang.org> | 2013-09-04 15:19:21 -0700 |
| commit | 2b44b36487a341fc2a8a23f8b35113bd4958af92 (patch) | |
| tree | 674981948b4ee7c489399269051c9bea07d208f9 /src/cmd/ld | |
| parent | dd3e522094cff3ccce7f6f5cd76b31598f5a3734 (diff) | |
| download | go-2b44b36487a341fc2a8a23f8b35113bd4958af92.tar.xz | |
cgo: enable cgo on dragonfly
Enable cgo for dragonfly/386 and dragonfly/amd64.
R=golang-dev, jsing, iant, bradfitz
CC=golang-dev
https://golang.org/cl/13247046
Diffstat (limited to 'src/cmd/ld')
| -rw-r--r-- | src/cmd/ld/lib.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c index 7639615b48..0d67ae999b 100644 --- a/src/cmd/ld/lib.c +++ b/src/cmd/ld/lib.c @@ -582,6 +582,16 @@ ldhostobj(void (*ld)(Biobuf*, char*, int64, char*), Biobuf *f, char *pkg, int64 } } + // DragonFly declares errno with __thread, which results in a symbol + // type of R_386_TLS_GD or R_X86_64_TLSGD. The Go linker does not + // currently know how to handle TLS relocations, hence we have to + // force external linking for any libraries that link in code that + // uses errno. This can be removed if the Go linker ever supports + // these relocation types. + if(HEADTYPE == Hdragonfly) + if(strcmp(pkg, "net") == 0 || strcmp(pkg, "os/user") == 0) + isinternal = 0; + if(!isinternal) externalobj = 1; |
