//build/toolchain/musl-host-gcc: implement

This is a cc_toolchain which runs on x86 systems with Linux/gcc and
targets Smalltown via static musl builds.

It is currently unused, but can be tested by trying to build any
cc_binary with
--crosstool_top=//build/toolchain/musl-host-gcc:musl_host_cc_suite .

Test Plan: This has been tested manually by running it against a simple cc_binary. Another revision on top of this will attempt to build mkfs.xfs with it.

X-Origin-Diff: phab/D623
GitOrigin-RevId: ebdf51ee76d9d5a7fd94725c66ef53783f787df7
diff --git a/build/toolchain/musl-host-gcc/musl.spec b/build/toolchain/musl-host-gcc/musl.spec
new file mode 100644
index 0000000..376d0d9
--- /dev/null
+++ b/build/toolchain/musl-host-gcc/musl.spec
@@ -0,0 +1,32 @@
+%rename cpp_options old_cpp_options
+
+*cpp_options:
+-nostdinc %(old_cpp_options) -isystem external/musl_sysroot/include
+
+*cc1:
+%(cc1_cpu) -nostdinc -isystem external/musl_sysroot/include
+
+*link_libgcc:
+-L .%s -L external/musl_sysroot/lib
+
+*libgcc:
+libgcc.a%s %:if-exists(libgcc_eh.a%s)
+
+*startfile:
+%{!shared: external/musl_sysroot/lib/Scrt1.o} external/musl_sysroot/lib/crti.o crtbeginS.o%s
+
+*endfile:
+crtendS.o%s external/musl_sysroot/lib/crtn.o
+
+*link:
+-nostdlib -no-dynamic-linker -static %{rdynamic:-export-dynamic}
+
+*esp_link:
+
+
+*esp_options:
+
+
+*esp_cpp_options:
+
+