Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(763)

Unified Diff: src/cmd/ld/lib.c

Issue 13213043: cgo: enable cgo on dragonfly
Patch Set: diff -r 2aef8fd83bbd https://go.googlecode.com/hg Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/6l/obj.c ('k') | src/pkg/go/build/build.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/ld/lib.c
===================================================================
--- a/src/cmd/ld/lib.c
+++ b/src/cmd/ld/lib.c
@@ -585,6 +585,16 @@
if(!isinternal)
externalobj = 1;
+ // 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)
+ externalobj = 1;
+
if(nhostobj >= mhostobj) {
if(mhostobj == 0)
mhostobj = 16;
« no previous file with comments | « src/cmd/6l/obj.c ('k') | src/pkg/go/build/build.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b