aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2018-06-26 18:59:07 +0200
committerDmitry Vyukov <dvyukov@google.com>2018-06-26 18:59:07 +0200
commiteecefab32c6f158629abd2ac7f6cb0b070f88b4a (patch)
treeae5b25c59c3f574c36f79144bf48117ad963dac1
parentb5f361149e86046a6cd8db76f26d75451a27fcab (diff)
Makefile: fix fuchsia build
-rw-r--r--Makefile5
-rw-r--r--sys/targets/targets.go10
2 files changed, 10 insertions, 5 deletions
diff --git a/Makefile b/Makefile
index 46fdc1514..7afef95cc 100644
--- a/Makefile
+++ b/Makefile
@@ -43,14 +43,13 @@ export CGO_ENABLED=0
ifeq ("$(TARGETOS)", "fuchsia")
# SOURCEDIR should point to fuchsia checkout.
- GO = $(SOURCEDIR)/buildtools/go
+ GO = $(SOURCEDIR)/third_party/go/bin/go
+ export GOROOT=$(SOURCEDIR)/third_party/go
export CGO_ENABLED=1
ifeq ("$(TARGETARCH)", "amd64")
- export GOROOT=$(SOURCEDIR)/out/debug-x64/goroot
# Required by the goroot.
export ZIRCON_BUILD_DIR=$(SOURCEDIR)/out/build-zircon/build-x64
else ifeq ("$(TARGETARCH)", "arm64")
- export GOROOT=$(SOURCEDIR)/out/debug-arm64/goroot
# Required by the goroot.
export ZIRCON_BUILD_DIR=$(SOURCEDIR)/out/build-zircon/build-arm64
endif
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index 2325f17c3..18fa08583 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -148,12 +148,16 @@ var List = map[string]map[string]*Target{
PageSize: 4 << 10,
CArch: []string{"__x86_64__"},
KernelHeaderArch: "x64",
- CCompiler: os.ExpandEnv("${SOURCEDIR}/buildtools/linux-x64/clang/bin/clang"),
+ CCompiler: os.ExpandEnv("${SOURCEDIR}/buildtools/linux-x64/clang/bin/clang++"),
CrossCFlags: []string{
+ "-Wno-deprecated",
+ "-Wno-error",
"--target=x86_64-fuchsia",
"-lfdio",
"-lzircon",
"--sysroot", os.ExpandEnv("${SOURCEDIR}/out/build-zircon/build-x64/sysroot"),
+ "-L", "${SOURCEDIR}/out/x64/x64-shared",
+ "-L", "${SOURCEDIR}/out/x64/sdks/zircon_sysroot/sysroot/lib",
},
},
"arm64": {
@@ -161,8 +165,10 @@ var List = map[string]map[string]*Target{
PageSize: 4 << 10,
CArch: []string{"__aarch64__"},
KernelHeaderArch: "arm64",
- CCompiler: os.ExpandEnv("${SOURCEDIR}/buildtools/linux-x64/clang/bin/clang"),
+ CCompiler: os.ExpandEnv("${SOURCEDIR}/buildtools/linux-x64/clang/bin/clang++"),
CrossCFlags: []string{
+ "-Wno-deprecated",
+ "-Wno-error",
"--target=aarch64-fuchsia",
"-lfdio",
"-lzircon",