diff options
author | Dave Cheney <dave@cheney.net> | 2014-03-07 09:55:59 +1100 |
---|---|---|
committer | Dave Cheney <dave@cheney.net> | 2014-03-07 09:55:59 +1100 |
commit | 91268cbc523667ae4fdc7037319c3832dbd3cc8d (patch) | |
tree | 85c8b8d92312fa6dec74911b800c91e4ac75ef2c /src/cmd/cc | |
parent | 1aff8efc07d8bfc95cfa47334877baf6b1bd1eff (diff) | |
download | go-91268cbc523667ae4fdc7037319c3832dbd3cc8d.tar.gz |
cmd/cc, cmd/5c, cmd/6c, cmd/8c: introduce linkarchinit and add amd64p32 support
Replaces CL 70000043.
Introduce linkarchinit() from cmd/ld.
For cmd/6c, switch to the amd64p32 linker model if we are building under nacl/amd64p32.
LGTM=rsc
R=rsc
CC=golang-codereviews
https://codereview.appspot.com/72010043
Diffstat (limited to 'src/cmd/cc')
-rw-r--r-- | src/cmd/cc/cc.h | 1 | ||||
-rw-r--r-- | src/cmd/cc/lex.c | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/src/cmd/cc/cc.h b/src/cmd/cc/cc.h index 726364ce9..c8aac1253 100644 --- a/src/cmd/cc/cc.h +++ b/src/cmd/cc/cc.h @@ -795,6 +795,7 @@ int32 exreg(Type*); int32 align(int32, Type*, int, int32*); int32 maxround(int32, int32); int hasdotdotdot(void); +void linkarchinit(void); extern schar ewidth[]; diff --git a/src/cmd/cc/lex.c b/src/cmd/cc/lex.c index f6025d280..a8ece212f 100644 --- a/src/cmd/cc/lex.c +++ b/src/cmd/cc/lex.c @@ -124,7 +124,7 @@ main(int argc, char *argv[]) p = getgoarch(); if(strncmp(p, thestring, strlen(thestring)) != 0) sysfatal("cannot use %cc with GOARCH=%s", thechar, p); - if(strcmp(getgoarch(), "amd64p32") == 0) // must be before cinit + if(strcmp(p, "amd64p32") == 0) // must be before cinit ewidth[TIND] = 4; nacl = strcmp(getgoos(), "nacl") == 0; @@ -133,6 +133,7 @@ main(int argc, char *argv[]) quotefmtinstall(); // before cinit, which overrides %Q + linkarchinit(); ctxt = linknew(thelinkarch); ctxt->diag = yyerror; ctxt->bso = &bstdout; |