Open cflewis opened 8 years ago
I build it with the patch:
diff --git a/src/cmd/6c/txt.c b/src/cmd/6c/txt.c
index 3bdbf41..916307d 100644
--- a/src/cmd/6c/txt.c
+++ b/src/cmd/6c/txt.c
@@ -992,7 +992,7 @@ gmove(Node *f, Node *t)
f->vconst &= 0xffff;
if(f->vconst & 0x8000){
f->vconst |= 0xffff0000;
- f->vconst |= (vlong)~0 << 32;
+ f->vconst |= (uvlong)~0 << 32;
}
a = AMOVL;
}
@@ -1042,7 +1042,7 @@ gmove(Node *f, Node *t)
f->vconst &= 0xff;
if(f->vconst & 0x80){
f->vconst |= 0xffffff00;
- f->vconst |= (vlong)~0 << 32;
+ f->vconst |= (uvlong)~0 << 32;
}
a = AMOVQ;
}
diff --git a/src/cmd/ld/lib.c b/src/cmd/ld/lib.c
index b92d2dd..65691c5 100644
--- a/src/cmd/ld/lib.c
+++ b/src/cmd/ld/lib.c
@@ -599,6 +599,8 @@ hostlink(void)
case '5':
argv[argc++] = "-marm";
break;
+ default:
+ break;
}
if(!debug['s'] && !debug_s) {
argv[argc++] = "-gdwarf-2";
diff --git a/src/liblink/asmv.c b/src/liblink/asmv.c
index 4bd7f7b..1c991c0 100644
--- a/src/liblink/asmv.c
+++ b/src/liblink/asmv.c
@@ -932,7 +932,7 @@ asmout(Link *ctxt, Prog *p, Optab *o, int32 *out)
int r, a;
Reloc *rel;
- o1 = o2 = o3 = o4 = 0;
+ o1 = o2 = o3 = o4 = o5 = 0;
switch(o->type) {
default:
ctxt->diag("unknown type %d", o->type);
However, it failed with the last step:
# Building packages and commands for linux/mips32.
runtime
go build runtime: /Users/yihao.peng/work/go-mips32/pkg/tool/darwin_amd64/vg: signal: abort trap
May we need the pull request: https://github.com/gomini/go-mips32/pull/7/files
Mac OS X 10.11:
src❯ ./make.bash go-mips32/git/dev.github !
Building C bootstrap tool.
cmd/dist
Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9 libbio liblink /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1467:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1463:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1447:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1436:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1429:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1413:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1402:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1395:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1379:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1369:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1362:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1359:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1356:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1350:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1344:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1341:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1337:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1325:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1321:7: error: variable 'o5' is used uninitialized whenever switch case is taken [-Werror,-Wsometimes-uninitialized] /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c:1475:11: note: uninitialized use occurs here fatal error: too many errors emitted, stopping now [-ferror-limit=] go tool dist: FAILED: clang -Wall -Wstrict-prototypes -Wextra -Wunused -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Wno-missing-field-initializers -Werror -fno-common -ggdb -pipe -Wuninitialized -O2 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -mmacosx-version-min=10.6 -c -m64 -I /Users/cflewis/Documents/Computing/mipsgo/go-mips32/include -I /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink -o /Users/cflewis/Documents/Computing/mipsgo/go-mips32/pkg/obj/liblink/asmv.o /Users/cflewis/Documents/Computing/mipsgo/go-mips32/src/liblink/asmv.c