summaryrefslogtreecommitdiff
path: root/toolchains/CC
diff options
context:
space:
mode:
Diffstat (limited to 'toolchains/CC')
-rw-r--r--toolchains/CC/clang.TARGETS89
-rw-r--r--toolchains/CC/compiler+tools.TARGETS5
-rw-r--r--toolchains/CC/foreign/busybox.TARGETS13
-rw-r--r--toolchains/CC/foreign/cmake.TARGETS8
-rw-r--r--toolchains/CC/foreign/compiler+tools.TARGETS5
-rw-r--r--toolchains/CC/foreign/make.TARGETS8
-rw-r--r--toolchains/CC/foreign/python.TARGETS7
-rw-r--r--toolchains/CC/foreign/tools-all.TARGETS10
-rw-r--r--toolchains/CC/gcc.TARGETS38
9 files changed, 183 insertions, 0 deletions
diff --git a/toolchains/CC/clang.TARGETS b/toolchains/CC/clang.TARGETS
new file mode 100644
index 0000000..bcea8e4
--- /dev/null
+++ b/toolchains/CC/clang.TARGETS
@@ -0,0 +1,89 @@
+{ "defaults":
+ { "type": ["@", "rules", "CC", "defaults"]
+ , "arguments_config": ["TOOLCHAIN_CONFIG"]
+ , "CC": ["clang/bin/clang"]
+ , "CXX": ["clang/bin/clang++"]
+ , "AR": ["clang/bin/ar"]
+ , "CXXFLAGS":
+ { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "USE_LIBCXX"
+ , "map":
+ { "type": "var"
+ , "name": "TOOLCHAIN_CONFIG"
+ , "default": {"type": "empty_map"}
+ }
+ }
+ , "then": ["-nostdlib++", "-stdlib=libc++"]
+ }
+ , "LDFLAGS":
+ { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "STATIC_RUNLIBS"
+ , "map":
+ { "type": "var"
+ , "name": "TOOLCHAIN_CONFIG"
+ , "default": {"type": "empty_map"}
+ }
+ }
+ , "then":
+ { "type": "++"
+ , "$1":
+ [ ["-static-libgcc"]
+ , { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "USE_LIBCXX"
+ , "map":
+ { "type": "var"
+ , "name": "TOOLCHAIN_CONFIG"
+ , "default": {"type": "empty_map"}
+ }
+ }
+ , "then":
+ [ "-Wl,--push-state"
+ , "-Wl,-Bstatic"
+ , "-lc++"
+ , "-lc++abi"
+ , "-Wl,--pop-state"
+ , "-lpthread"
+ ]
+ , "else": ["-static-libstdc++", "-l:libstdc++.a"]
+ }
+ ]
+ }
+ }
+ , "deps":
+ { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "STATIC_RUNLIBS"
+ , "map":
+ { "type": "var"
+ , "name": "TOOLCHAIN_CONFIG"
+ , "default": {"type": "empty_map"}
+ }
+ }
+ , "then": []
+ , "else":
+ { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "USE_LIBCXX"
+ , "map":
+ { "type": "var"
+ , "name": "TOOLCHAIN_CONFIG"
+ , "default": {"type": "empty_map"}
+ }
+ }
+ , "then": [["@", "clang", "", "runlibs_libcxx"]]
+ , "else": [["@", "clang", "", "runlibs"]]
+ }
+ }
+ , "toolchain": ["staged-clang"]
+ , "PATH": ["$(TOOLCHAIN)/clang/bin", "/bin"]
+ }
+, "staged-clang": {"type": "install", "dirs": [[["", "toolchain"], "clang"]]}
+}
diff --git a/toolchains/CC/compiler+tools.TARGETS b/toolchains/CC/compiler+tools.TARGETS
new file mode 100644
index 0000000..c72120b
--- /dev/null
+++ b/toolchains/CC/compiler+tools.TARGETS
@@ -0,0 +1,5 @@
+{ "defaults":
+ { "type": ["@", "rules", "CC", "defaults"]
+ , "base": [["@", "compiler", "CC", "defaults"]]
+ }
+}
diff --git a/toolchains/CC/foreign/busybox.TARGETS b/toolchains/CC/foreign/busybox.TARGETS
new file mode 100644
index 0000000..d051ad1
--- /dev/null
+++ b/toolchains/CC/foreign/busybox.TARGETS
@@ -0,0 +1,13 @@
+{ "defaults":
+ { "type": ["@", "rules", "CC/foreign", "defaults"]
+ , "toolchain": ["staged-busybox"]
+ , "PATH":
+ [ "$(TOOLCHAIN)/busybox/bin"
+ , "$(TOOLCHAIN)/busybox/sbin"
+ , "$(TOOLCHAIN)/busybox/usr/bin"
+ , "$(TOOLCHAIN)/busybox/usr/sbin"
+ ]
+ }
+, "staged-busybox":
+ {"type": "install", "dirs": [[["", "toolchain"], "busybox"]]}
+}
diff --git a/toolchains/CC/foreign/cmake.TARGETS b/toolchains/CC/foreign/cmake.TARGETS
new file mode 100644
index 0000000..facb83d
--- /dev/null
+++ b/toolchains/CC/foreign/cmake.TARGETS
@@ -0,0 +1,8 @@
+{ "defaults":
+ { "type": ["@", "rules", "CC/foreign", "defaults"]
+ , "CMAKE": ["cmake/bin/cmake"]
+ , "toolchain": ["staged-cmake"]
+ , "PATH": ["$(TOOLCHAIN)/cmake/bin"]
+ }
+, "staged-cmake": {"type": "install", "dirs": [[["", "toolchain"], "cmake"]]}
+}
diff --git a/toolchains/CC/foreign/compiler+tools.TARGETS b/toolchains/CC/foreign/compiler+tools.TARGETS
new file mode 100644
index 0000000..bc75880
--- /dev/null
+++ b/toolchains/CC/foreign/compiler+tools.TARGETS
@@ -0,0 +1,5 @@
+{ "defaults":
+ { "type": ["@", "rules", "CC/foreign", "defaults"]
+ , "base": [["@", "tools", "CC/foreign", "defaults"]]
+ }
+}
diff --git a/toolchains/CC/foreign/make.TARGETS b/toolchains/CC/foreign/make.TARGETS
new file mode 100644
index 0000000..ca679db
--- /dev/null
+++ b/toolchains/CC/foreign/make.TARGETS
@@ -0,0 +1,8 @@
+{ "defaults":
+ { "type": ["@", "rules", "CC/foreign", "defaults"]
+ , "MAKE": ["make/bin/make"]
+ , "PATH": ["$(TOOLCHAIN)/make/bin"]
+ , "toolchain": ["staged-make"]
+ }
+, "staged-make": {"type": "install", "dirs": [[["", "toolchain"], "make"]]}
+}
diff --git a/toolchains/CC/foreign/python.TARGETS b/toolchains/CC/foreign/python.TARGETS
new file mode 100644
index 0000000..2824c77
--- /dev/null
+++ b/toolchains/CC/foreign/python.TARGETS
@@ -0,0 +1,7 @@
+{ "defaults":
+ { "type": ["@", "rules", "CC/foreign", "defaults"]
+ , "toolchain": ["staged-python"]
+ , "PATH": ["$(TOOLCHAIN)/python/usr/bin"]
+ }
+, "staged-python": {"type": "install", "dirs": [[["", "toolchain"], "python"]]}
+}
diff --git a/toolchains/CC/foreign/tools-all.TARGETS b/toolchains/CC/foreign/tools-all.TARGETS
new file mode 100644
index 0000000..260bc43
--- /dev/null
+++ b/toolchains/CC/foreign/tools-all.TARGETS
@@ -0,0 +1,10 @@
+{ "defaults":
+ { "type": ["@", "rules", "CC/foreign", "defaults"]
+ , "base":
+ [ ["@", "busybox", "CC/foreign", "defaults"]
+ , ["@", "make", "CC/foreign", "defaults"]
+ , ["@", "cmake", "CC/foreign", "defaults"]
+ , ["@", "python", "CC/foreign", "defaults"]
+ ]
+ }
+}
diff --git a/toolchains/CC/gcc.TARGETS b/toolchains/CC/gcc.TARGETS
new file mode 100644
index 0000000..c0b6fbe
--- /dev/null
+++ b/toolchains/CC/gcc.TARGETS
@@ -0,0 +1,38 @@
+{ "defaults":
+ { "type": ["@", "rules", "CC", "defaults"]
+ , "arguments_config": ["TOOLCHAIN_CONFIG"]
+ , "CC": ["gcc/bin/gcc"]
+ , "CXX": ["gcc/bin/g++"]
+ , "AR": ["gcc/bin/ar"]
+ , "LDFLAGS":
+ { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "STATIC_RUNLIBS"
+ , "map":
+ { "type": "var"
+ , "name": "TOOLCHAIN_CONFIG"
+ , "default": {"type": "empty_map"}
+ }
+ }
+ , "then": ["-static-libgcc", "-static-libstdc++"]
+ }
+ , "deps":
+ { "type": "if"
+ , "cond":
+ { "type": "lookup"
+ , "key": "STATIC_RUNLIBS"
+ , "map":
+ { "type": "var"
+ , "name": "TOOLCHAIN_CONFIG"
+ , "default": {"type": "empty_map"}
+ }
+ }
+ , "then": []
+ , "else": [["@", "gcc", "", "runlibs"]]
+ }
+ , "toolchain": ["staged-gcc"]
+ , "PATH": ["$(TOOLCHAIN)/gcc/bin", "/bin"]
+ }
+, "staged-gcc": {"type": "install", "dirs": [[["", "toolchain"], "gcc"]]}
+}