From 1eccae287b4c9059c09b3cb4cc2e5bd14b108031 Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Mon, 4 Jun 2018 01:09:33 +0200 Subject: [PATCH] tgo: Fix runtime.TargetBits --- tgo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tgo.go b/tgo.go index 49bcbc0ef..16a1be944 100644 --- a/tgo.go +++ b/tgo.go @@ -414,7 +414,7 @@ func (c *Compiler) parsePackage(program *ssa.Program, pkg *ssa.Package) error { if !strings.HasPrefix(member.Name(), "_extern_") { global.SetLinkage(llvm.PrivateLinkage) if getGlobalName(member) == "runtime.TargetBits" { - bitness := c.targetData.PointerSize() + bitness := c.targetData.PointerSize() * 8 if bitness < 32 { // Only 8 and 32+ architectures supported at the moment. // On 8 bit architectures, pointers are normally bigger