Merge pull request #614 from ploetzma/occSupport

Add support for P9 occ compile
diff --git a/openpower/package/Config.in b/openpower/package/Config.in
index 0963613..cbeae17 100755
--- a/openpower/package/Config.in
+++ b/openpower/package/Config.in
@@ -17,3 +17,5 @@
 source "$BR2_EXTERNAL/package/libflash/Config.in"
 source "$BR2_EXTERNAL/package/loadkeys/Config.in"
 source "$BR2_EXTERNAL/package/witherspoon-xml/Config.in"
+source "$BR2_EXTERNAL/package/ppe42-binutils/Config.in"
+source "$BR2_EXTERNAL/package/ppe42-gcc/Config.in"
diff --git a/openpower/package/ppe42-binutils/Config.in b/openpower/package/ppe42-binutils/Config.in
new file mode 100644
index 0000000..d8e2be4
--- /dev/null
+++ b/openpower/package/ppe42-binutils/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HOST_PPE42_BINUTILS
+        bool "ppe42-binutils"
+        default y if (BR2_OPENPOWER_PLATFORM && BR2_powerpc_power9)
+        select BR2_CPP
+        help
+            Project to build the PPE42 PORE binutils
diff --git a/openpower/package/ppe42-binutils/ppe42-binutils.mk b/openpower/package/ppe42-binutils/ppe42-binutils.mk
new file mode 100644
index 0000000..3a9c125
--- /dev/null
+++ b/openpower/package/ppe42-binutils/ppe42-binutils.mk
@@ -0,0 +1,32 @@
+################################################################################
+#
+# ppe42-binutils
+#
+################################################################################
+
+PPE42_BINUTILS_VERSION ?= 5b161fc30519a965f16e7e73c3410a388140cba1
+PPE42_BINUTILS_SITE ?= $(call github,open-power,ppe42-binutils,$(PPE42_BINUTILS_VERSION))
+PPE42_BINUTILS_LICENSE = GPLv3+
+
+PPE42_BINUTILS_DEPENDENCIES = host-binutils
+
+PPE42_BINUTILS_DIR = $(STAGING_DIR)/ppe42-binutils
+PPE42_BINUTILS_BIN = $(STAGING_DIR)/ppe42-binutils/linux
+
+define HOST_PPE42_BINUTILS_BUILD_CMDS
+        cd $(@D) && \
+        ./configure --prefix=$(PPE42_BINUTILS_DIR) \
+                    --exec-prefix=$(PPE42_BINUTILS_BIN) \
+					--target=powerpc-eabi \
+					--enable-shared \
+					--enable-64-bit-bfd \
+					&& \
+        make configure-host && \
+        make LDFLAGS=-all-static CFLAGS=-Wno-error=unused-value
+endef
+
+define HOST_PPE42_BINUTILS_INSTALL_CMDS
+        bash -c 'cd $(@D) && make install'
+endef
+
+$(eval $(host-generic-package))
diff --git a/openpower/package/ppe42-gcc/Config.in b/openpower/package/ppe42-gcc/Config.in
new file mode 100644
index 0000000..d683712
--- /dev/null
+++ b/openpower/package/ppe42-gcc/Config.in
@@ -0,0 +1,6 @@
+config BR2_PACKAGE_HOST_PPE42_GCC
+        bool "ppe42-gcc"
+        default y if (BR2_OPENPOWER_PLATFORM && BR2_powerpc_power9)
+        select BR2_CPP
+        help
+            Project to build the PPE42 gcc
diff --git a/openpower/package/ppe42-gcc/ppe42-gcc.mk b/openpower/package/ppe42-gcc/ppe42-gcc.mk
new file mode 100644
index 0000000..cf8ac73
--- /dev/null
+++ b/openpower/package/ppe42-gcc/ppe42-gcc.mk
@@ -0,0 +1,36 @@
+################################################################################
+#
+# ppe42-gcc
+#
+################################################################################
+
+PPE42_GCC_VERSION ?= 246277a8513f622a65f97cb59e3079fc8834a913
+PPE42_GCC_SITE ?= $(call github,open-power,ppe42-gcc,$(PPE42_GCC_VERSION))
+PPE42_GCC_LICENSE = GPLv3+
+
+PPE42_GCC_DEPENDENCIES = ppe42-binutils
+
+PPE42_GCC_DIR = $(STAGING_DIR)/ppe42-binutils
+PPE42_GCC_BIN = $(STAGING_DIR)/ppe42-binutils/linux
+
+define HOST_PPE42_GCC_BUILD_CMDS
+        cd $(@D) && \
+        ./configure --prefix=$(PPE42_GCC_DIR) \
+                    --exec-prefix=$(PPE42_GCC_BIN) \
+					--target=powerpc-eabi \
+					--without-headers \
+					--with-newlib \
+					--with-gnu-as \
+					--with-gnu-ld \
+					--with-gmp=$(HOST_DIR)/usr \
+					--with-mpfr=$(HOST_DIR)/usr \
+					&& \
+        make configure-host && \
+        make all-gcc
+endef
+
+define HOST_PPE42_GCC_INSTALL_CMDS
+        bash -c 'cd $(@D) && make install-gcc'
+endef
+
+$(eval $(host-generic-package))