Commit 54193689 authored by Jan Ziak's avatar Jan Ziak Committed by Russ Cox

cmd/ld: fix compilation when GOARCH != GOHOSTARCH

R=rsc, dave, minux.ma
CC=golang-dev
https://golang.org/cl/6493123
parent 0f8f5d21
......@@ -11,7 +11,6 @@
enum {
Debug = 0,
PtrSize = sizeof(void*),
DebugMark = 0, // run second pass to check mark
DataBlock = 8*1024,
......
......@@ -118,6 +118,10 @@ enum
true = 1,
false = 0,
};
enum
{
PtrSize = sizeof(void*),
};
/*
* structures
......
......@@ -2,6 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// PtrSize vs sizeof(void*): This file is also included from src/cmd/ld/...
// which defines PtrSize to be different from sizeof(void*) when crosscompiling.
enum {
KindBool = 1,
KindInt,
......@@ -33,6 +36,6 @@ enum {
KindNoPointers = 1<<7,
// size of Type interface header + CommonType structure.
CommonSize = 2*sizeof(void*) + 6*sizeof(void*) + 8,
CommonSize = 2*PtrSize + 6*PtrSize + 8,
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment