Enable ppe42-{gcc,binutils} as external toolchain
Create the infrastructure necessary to bundle ppe42-gcc and
ppe42-binutils as part of the sdk build, allowing it to be
re-inserted as part of an external sdk.
Signed-off-by: Klaus Heinrich Kiwi <klaus@linux.vnet.ibm.com>
diff --git a/openpower/package/ppe42-toolchain-external/Config.in b/openpower/package/ppe42-toolchain-external/Config.in
new file mode 100644
index 0000000..10b58db
--- /dev/null
+++ b/openpower/package/ppe42-toolchain-external/Config.in
@@ -0,0 +1,18 @@
+config BR2_PACKAGE_PPE42_TOOLCHAIN_EXTERNAL
+ bool "ppe42-toolchain-external"
+ select BR2_PACKAGE_HAS_PPE42_TOOLCHAIN
+ help
+ Use an external PPE42 toolchain
+
+if BR2_PACKAGE_PPE42_TOOLCHAIN_EXTERNAL
+config BR2_PACKAGE_PROVIDES_PPE42_TOOLCHAIN
+ default "ppe42-toolchain-external"
+
+config BR2_PPE42_TOOLCHAIN_EXTERNAL_PATH
+ string "External PPE42 toolchain path"
+ help
+ Pathname to where the external PPE42 toolchain is
+ installed. The compiler is expected to be fully
+ contained within the "sysroot/ppe42-toolchain"
+ directory
+endif
diff --git a/openpower/package/ppe42-toolchain-external/ppe42-toolchain-external.mk b/openpower/package/ppe42-toolchain-external/ppe42-toolchain-external.mk
new file mode 100644
index 0000000..1fb9f00
--- /dev/null
+++ b/openpower/package/ppe42-toolchain-external/ppe42-toolchain-external.mk
@@ -0,0 +1,23 @@
+################################################################################
+#
+# ppe42-toolchain-external
+#
+################################################################################
+PPE42_TOOLCHAIN_EXTERNAL_REDISTRIBUTE = NO
+PPE42_TOOLCHAIN_EXTERNAL_SITE =
+PPE42_TOOLCHAIN_EXTERNAL_SOURCE =
+PPE42_TOOLCHAIN_EXTERNAL_PROVIDES = ppe42-toolchain
+PPE42_TOOLCHAIN_EXTERNAL_PATH = \
+ $(call qstrip,$(BR2_PPE42_TOOLCHAIN_EXTERNAL_PATH))/$(PPE42_TOOLCHAIN_DIR)
+
+define HOST_PPE42_TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
+ test -e $(PPE42_TOOLCHAIN_EXTERNAL_PATH)
+endef
+
+define HOST_PPE42_TOOLCHAIN_EXTERNAL_INSTALL_CMDS
+ ln -snf $(PPE42_TOOLCHAIN_EXTERNAL_PATH) $(HOST_DIR)/$(PPE42_TOOLCHAIN_DIR)
+
+endef
+
+$(eval $(host-generic-package))
+