1
0
mirror of https://github.com/golang/go synced 2024-11-21 22:04:39 -07:00

cmd/dist: Plan 9 build needs an additional include path

cmd/cc: bv.c imports libc.h twice

When using the Plan 9 compiler, the invocation

        #include <../ld/textflag.h>

works for the toolchain, but not for the MACH library.

Module cmd/cc/bv.c includes libc.h and "cc.h", which in
turn also includes libc.h.  In the Plan 9 context, this
causes a number of duplicate definitions.

R=golang-dev, rsc, r
CC=golang-dev
https://golang.org/cl/13303047
This commit is contained in:
Lucio De Re 2013-09-06 16:15:44 +10:00 committed by Rob Pike
parent 6833d1b436
commit fd7ddad160
2 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,6 @@
// license that can be found in the LICENSE file.
#include <u.h>
#include <libc.h>
#include "cc.h"
enum {

View File

@ -932,6 +932,8 @@ install(char *dir)
vadd(&compile, "-Bp+");
vadd(&compile, bpathf(&b, "-I%s/include/plan9", goroot));
vadd(&compile, bpathf(&b, "-I%s/include/plan9/%s", goroot, gohostarch));
// Work around Plan 9 C compiler's handling of #include with .. path.
vadd(&compile, bpathf(&b, "-I%s/src/cmd/ld", goroot));
} else {
vcopy(&compile, gccargs.p, gccargs.len);
vadd(&compile, "-c");