Enable p8-pore-binutils as an external toolchain
Create the infrastructure necessary to bundle the p8-pore-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/p8-pore-toolchain-external/Config.in b/openpower/package/p8-pore-toolchain-external/Config.in
new file mode 100644
index 0000000..cad96c0
--- /dev/null
+++ b/openpower/package/p8-pore-toolchain-external/Config.in
@@ -0,0 +1,19 @@
+config BR2_PACKAGE_P8_PORE_TOOLCHAIN_EXTERNAL
+ bool "p8-pore-toolchain-external"
+ select BR2_PACKAGE_HAS_P8_PORE_TOOLCHAIN
+ help
+ Use an external P8 PORE toolchain
+
+if BR2_PACKAGE_P8_PORE_TOOLCHAIN_EXTERNAL
+config BR2_PACKAGE_PROVIDES_P8_PORE_TOOLCHAIN
+ default "p8-pore-toolchain-external"
+
+config BR2_P8_PORE_TOOLCHAIN_EXTERNAL_PATH
+ string "External P8 PORE toolchain path"
+ help
+ Pathname to where the external P8 PORE toolchain
+ is installed. The binutils are expected to be
+ fully contained within the
+ "sysroot/p8-pore-toolchain" directory
+endif
+
diff --git a/openpower/package/p8-pore-toolchain-external/p8-pore-toolchain-external.mk b/openpower/package/p8-pore-toolchain-external/p8-pore-toolchain-external.mk
new file mode 100644
index 0000000..c88864a
--- /dev/null
+++ b/openpower/package/p8-pore-toolchain-external/p8-pore-toolchain-external.mk
@@ -0,0 +1,22 @@
+################################################################################
+#
+# p8-pore-toolchain-external
+#
+################################################################################
+P8_PORE_TOOLCHAIN_EXTERNAL_REDISTRIBUTE = NO
+P8_PORE_TOOLCHAIN_EXTERNAL_SITE =
+P8_PORE_TOOLCHAIN_EXTERNAL_SOURCE =
+P8_PORE_TOOLCHAIN_EXTERNAL_PROVIDES = p8-pore-toolchain
+P8_PORE_TOOLCHAIN_EXTERNAL_PATH = \
+ $(call qstrip,$(BR2_P8_PORE_TOOLCHAIN_EXTERNAL_PATH))/$(P8_PORE_TOOLCHAIN_DIR)
+
+define HOST_P8_PORE_TOOLCHAIN_EXTERNAL_CONFIGURE_CMDS
+ test -e $(P8_PORE_TOOLCHAIN_EXTERNAL_PATH)
+endef
+
+define HOST_P8_PORE_TOOLCHAIN_EXTERNAL_INSTALL_CMDS
+ ln -snf $(P8_PORE_TOOLCHAIN_EXTERNAL_PATH) $(HOST_DIR)/$(P8_PORE_TOOLCHAIN_DIR)
+
+endef
+
+$(eval $(host-generic-package))