diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/cmd/ld/lib.c | 2 | ||||
| -rwxr-xr-x | src/run.bash | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c index 2975b2327a..da6194e4ff 100644 --- a/src/cmd/ld/lib.c +++ b/src/cmd/ld/lib.c @@ -205,6 +205,8 @@ loadlib(void) // whether to initialize the TLS. So give it one. This could // be handled differently but it's an unusual case. loadinternal("runtime/cgo"); + if(i < ctxt->libraryp) + objfile(ctxt->library[i].file, ctxt->library[i].pkg); // Pretend that we really imported the package. s = linklookup(ctxt, "go.importpath.runtime/cgo.", 0); diff --git a/src/run.bash b/src/run.bash index 4706c2bc4f..76216ba010 100755 --- a/src/run.bash +++ b/src/run.bash @@ -145,6 +145,9 @@ dragonfly-386 | dragonfly-amd64 | freebsd-386 | freebsd-amd64 | freebsd-arm | li echo "No support for static linking found (lacks libc.a?), skip cgo static linking test." else go test -ldflags '-linkmode=external -extldflags "-static -pthread"' ../testtls || exit 1 + go test ../nocgo || exit 1 + go test -ldflags '-linkmode=external' ../nocgo || exit 1 + go test -ldflags '-linkmode=external -extldflags "-static -pthread"' ../nocgo || exit 1 fi ;; esac |
