summaryrefslogtreecommitdiff
path: root/toolchains
diff options
context:
space:
mode:
authorOliver Reiche <oliver.reiche@huawei.com>2023-10-20 16:07:58 +0200
committerOliver Reiche <oliver.reiche@huawei.com>2023-10-20 16:07:58 +0200
commit060a0cf338d6024eee37cc344c224fe3bcb78e81 (patch)
tree3fea7c654b69ecf3490fe9c6cbc542aba0d5bd8f /toolchains
downloadbootstrappable-toolchain-060a0cf338d6024eee37cc344c224fe3bcb78e81.tar.gz
Initial commit
Diffstat (limited to 'toolchains')
-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
-rw-r--r--toolchains/busybox.TARGETS3
-rw-r--r--toolchains/clang.TARGETS3
-rw-r--r--toolchains/cmake.TARGETS3
-rw-r--r--toolchains/compiler+tools.TARGETS8
-rw-r--r--toolchains/gcc.TARGETS3
-rw-r--r--toolchains/make.TARGETS3
-rw-r--r--toolchains/patch/busybox.TARGETS9
-rw-r--r--toolchains/patch/compiler+tools.TARGETS5
-rw-r--r--toolchains/patch/tools-all.TARGETS5
-rw-r--r--toolchains/python.TARGETS3
-rw-r--r--toolchains/tools-all.TARGETS10
20 files changed, 238 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"]]}
+}
diff --git a/toolchains/busybox.TARGETS b/toolchains/busybox.TARGETS
new file mode 100644
index 0000000..53e5b24
--- /dev/null
+++ b/toolchains/busybox.TARGETS
@@ -0,0 +1,3 @@
+{ "toolchain":
+ {"type": "install", "dirs": [[["@", "busybox", "", "toolchain"], "."]]}
+}
diff --git a/toolchains/clang.TARGETS b/toolchains/clang.TARGETS
new file mode 100644
index 0000000..8cdc4a3
--- /dev/null
+++ b/toolchains/clang.TARGETS
@@ -0,0 +1,3 @@
+{ "toolchain":
+ {"type": "install", "dirs": [[["@", "clang", "", "toolchain"], "."]]}
+}
diff --git a/toolchains/cmake.TARGETS b/toolchains/cmake.TARGETS
new file mode 100644
index 0000000..bb16198
--- /dev/null
+++ b/toolchains/cmake.TARGETS
@@ -0,0 +1,3 @@
+{ "toolchain":
+ {"type": "install", "dirs": [[["@", "cmake", "", "toolchain"], "."]]}
+}
diff --git a/toolchains/compiler+tools.TARGETS b/toolchains/compiler+tools.TARGETS
new file mode 100644
index 0000000..0f21c76
--- /dev/null
+++ b/toolchains/compiler+tools.TARGETS
@@ -0,0 +1,8 @@
+{ "toolchain":
+ { "type": "install"
+ , "dirs":
+ [ [["@", "tools", "", "toolchain"], "."]
+ , [["@", "compiler", "", "toolchain"], "compiler"]
+ ]
+ }
+}
diff --git a/toolchains/gcc.TARGETS b/toolchains/gcc.TARGETS
new file mode 100644
index 0000000..4c129eb
--- /dev/null
+++ b/toolchains/gcc.TARGETS
@@ -0,0 +1,3 @@
+{ "toolchain":
+ {"type": "install", "dirs": [[["@", "gcc", "", "toolchain"], "."]]}
+}
diff --git a/toolchains/make.TARGETS b/toolchains/make.TARGETS
new file mode 100644
index 0000000..2d2bed2
--- /dev/null
+++ b/toolchains/make.TARGETS
@@ -0,0 +1,3 @@
+{ "toolchain":
+ {"type": "install", "dirs": [[["@", "make", "", "toolchain"], "."]]}
+}
diff --git a/toolchains/patch/busybox.TARGETS b/toolchains/patch/busybox.TARGETS
new file mode 100644
index 0000000..5581cb7
--- /dev/null
+++ b/toolchains/patch/busybox.TARGETS
@@ -0,0 +1,9 @@
+{ "defaults":
+ { "type": ["@", "rules", "patch", "defaults"]
+ , "PATCH": ["busybox/usr/bin/patch"]
+ , "toolchain": ["staged-busybox"]
+ , "PATH": ["/bin"]
+ }
+, "staged-busybox":
+ {"type": "install", "dirs": [[["", "toolchain"], "busybox"]]}
+}
diff --git a/toolchains/patch/compiler+tools.TARGETS b/toolchains/patch/compiler+tools.TARGETS
new file mode 100644
index 0000000..86297fe
--- /dev/null
+++ b/toolchains/patch/compiler+tools.TARGETS
@@ -0,0 +1,5 @@
+{ "defaults":
+ { "type": ["@", "rules", "patch", "defaults"]
+ , "base": [["@", "tools", "patch", "defaults"]]
+ }
+}
diff --git a/toolchains/patch/tools-all.TARGETS b/toolchains/patch/tools-all.TARGETS
new file mode 100644
index 0000000..0dd1455
--- /dev/null
+++ b/toolchains/patch/tools-all.TARGETS
@@ -0,0 +1,5 @@
+{ "defaults":
+ { "type": ["@", "rules", "patch", "defaults"]
+ , "base": [["@", "busybox", "patch", "defaults"]]
+ }
+}
diff --git a/toolchains/python.TARGETS b/toolchains/python.TARGETS
new file mode 100644
index 0000000..14e16c0
--- /dev/null
+++ b/toolchains/python.TARGETS
@@ -0,0 +1,3 @@
+{ "toolchain":
+ {"type": "install", "dirs": [[["@", "python", "", "toolchain"], "."]]}
+}
diff --git a/toolchains/tools-all.TARGETS b/toolchains/tools-all.TARGETS
new file mode 100644
index 0000000..2330537
--- /dev/null
+++ b/toolchains/tools-all.TARGETS
@@ -0,0 +1,10 @@
+{ "toolchain":
+ { "type": "install"
+ , "dirs":
+ [ [["@", "busybox", "", "toolchain"], "busybox"]
+ , [["@", "make", "", "toolchain"], "make"]
+ , [["@", "cmake", "", "toolchain"], "cmake"]
+ , [["@", "python", "", "toolchain"], "python"]
+ ]
+ }
+}