aboutsummaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorSiddharth M <siddharth.muralee@gmail.com>2019-01-24 15:57:36 +0530
committerDmitry Vyukov <dvyukov@google.com>2019-01-24 11:27:36 +0100
commitf4e42cabb707a984e6b6e5589653e11cfd2856aa (patch)
treea76b4b10cde47550c22fc5a23710388e399ca31c /sys
parentce1ccf972381f6e1ba6e9c9c99655dc20dcbfab3 (diff)
sys/targets: support netbsd cross compilation on linux
* Support cross compilation on linux * typo fix * fixed indentation * Add a trailing '/' after SOURCEDIR
Diffstat (limited to 'sys')
-rw-r--r--sys/targets/targets.go12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index e9d1df296..60c407cc0 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -181,10 +181,13 @@ var List = map[string]map[string]*Target{
},
"netbsd": {
"amd64": {
- PtrSize: 8,
- PageSize: 4 << 10,
- CFlags: []string{"-m64"},
- CrossCFlags: []string{"-m64", "-static"},
+ PtrSize: 8,
+ PageSize: 4 << 10,
+ CFlags: []string{"-m64"},
+ CrossCFlags: []string{"-m64", "-static",
+ "--sysroot", os.ExpandEnv("${SOURCEDIR}/../dest/"),
+ },
+ CCompiler: os.ExpandEnv("${SOURCEDIR}/../tools/bin/x86_64--netbsd-g++"),
},
},
"openbsd": {
@@ -303,6 +306,7 @@ var oses = map[string]osCommon{
CPP: "g++",
},
"netbsd": {
+ BuildOS: "linux",
SyscallNumbers: true,
SyscallPrefix: "SYS_",
ExecutorUsesShmem: true,