1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-11-28 09:24:14 +01:00

Enable build on ppc64le systems

Tested on a POWER9 Blackbird desktop
This commit is contained in:
Timothy Pearson 2019-04-13 05:33:52 +00:00
parent 72330aaddd
commit 7360498db7

View File

@ -3,6 +3,7 @@
<!--echo message="os.name = ${os.name}" /-->
<!--echo message="os.arch = ${os.arch}" /-->
<!--echo message="os.version = ${os.version}" /-->
<echo message="os.arch = ${os.arch}"/>
<tstamp>
<format property="BUILD_DATE" pattern="yyyy/MM/dd hh:mm"/>
@ -24,6 +25,7 @@
<condition property="platform" value="linux64"><os family="unix" arch="amd64" /></condition>
<condition property="platform" value="linuxarm"><os family="unix" arch="arm" /></condition>
<condition property="platform" value="linuxaarch64"><os family="unix" arch="aarch64" /></condition>
<condition property="platform" value="linuxppc64le"><os family="unix" arch="ppc64le" /></condition>
<condition property="windows_host" value="true"><os family="windows" /></condition>
@ -35,6 +37,7 @@
<condition property="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linuxarm" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linuxaarch64" /></condition>
<condition property="linux"><equals arg1="${platform}" arg2="linuxppc64le" /></condition>
<condition property="staging_folder" value="macosx"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="staging_folder" value="windows"><equals arg1="${platform}" arg2="windows" /></condition>
@ -42,6 +45,7 @@
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linuxarm" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linuxaarch64" /></condition>
<condition property="staging_folder" value="linux"><equals arg1="${platform}" arg2="linuxppc64le" /></condition>
<condition property="staging_hardware_folder" value="Arduino.app/Contents/Java/hardware"><equals arg1="${platform}" arg2="macosx" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="windows" /></condition>
@ -49,6 +53,7 @@
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linux64" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linuxarm" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linuxaarch64" /></condition>
<condition property="staging_hardware_folder" value="hardware"><equals arg1="${platform}" arg2="linuxppc64le" /></condition>
<condition property="arch-bits" value="32">
<equals arg1="${platform}" arg2="linux32"/>
@ -62,6 +67,9 @@
<condition property="arch-bits" value="64">
<equals arg1="${platform}" arg2="linuxaarch64"/>
</condition>
<condition property="arch-bits" value="64">
<equals arg1="${platform}" arg2="linuxppc64le"/>
</condition>
<condition property="launch4j-download-unpack-target-name" value="launch4j-windows"><os family="windows" /></condition>
<property name="launch4j-download-unpack-target-name" value="launch4j-linux"/>
@ -72,12 +80,14 @@
<property name="LINUX64_BUNDLED_JVM" value="none"/>
<property name="LINUXARM_BUNDLED_JVM" value="none"/>
<property name="LINUXAARCH64_BUNDLED_JVM" value="none"/>
<property name="LINUXPOWERPC64LE_BUNDLED_JVM" value="none"/>
<condition property="linux-bundle-jvm-task" value="noop">
<and>
<equals arg1="${LINUX32_BUNDLED_JVM}" arg2="none"/>
<equals arg1="${LINUX64_BUNDLED_JVM}" arg2="none"/>
<equals arg1="${LINUXARM_BUNDLED_JVM}" arg2="none"/>
<equals arg1="${LINUXAARCH64_BUNDLED_JVM}" arg2="none"/>
<equals arg1="${LINUXPOWERPC64LE_BUNDLED_JVM}" arg2="none"/>
</and>
</condition>
<condition property="linux-bundle-jvm-task" value="bundle">
@ -94,6 +104,9 @@
<not>
<equals arg1="${LINUXAARCH64_BUNDLED_JVM}" arg2="none"/>
</not>
<not>
<equals arg1="${LINUXPOWERPC64LE_BUNDLED_JVM}" arg2="none"/>
</not>
</or>
</condition>
@ -763,6 +776,48 @@
</antcall>
</target>
<target name="linux-libastyle-ppc64le" depends="linux-build" description="Download libastyle.so for PowerPC64LE">
<antcall target="unzip">
<param name="archive_file" value="./libastylej-2.05.1-4.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/libastylej-2.05.1-4.zip" />
<param name="final_folder" value="${staging_folder}/libastylej-2.05.1" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/libastylej-2.05.1/libastylej_ppc64le.so" tofile="linux/work/lib/libastylej.so" />
<chmod perm="755" file="linux/work/lib/libastylej.so" />
<antcall target="portable-${portable}">
<param name="parentdir" value="linux/work" />
</antcall>
<antcall target="unzip">
<param name="archive_file" value="./liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="archive_url" value="https://downloads.arduino.cc/liblistSerials/liblistSerials-${LIBLISTSERIAL-VERSION}.zip" />
<param name="final_folder" value="${staging_folder}/liblistSerials-${LIBLISTSERIAL-VERSION}" />
<param name="dest_folder" value="${staging_folder}" />
</antcall>
<copy file="linux/liblistSerials-${LIBLISTSERIAL-VERSION}/ppc64le/liblistSerialsj.so" todir="linux/work/lib/" />
<chmod perm="755" file="linux/work/lib/liblistSerialsj.so" />
</target>
<target name="linuxppc64le-build" depends="linux-libastyle-ppc64le" description="Build Linux (PowerPC64LE) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUXPOWERPC64LE_BUNDLED_JVM}"/>
</antcall>
<antcall target="build-arduino-builder" />
<antcall target="avr-toolchain-bundle">
<param name="unpack_target" value="untar"/>
<param name="gcc_archive_file" value="avr-gcc-${AVRGCC-VERSION}-powerpc64le-pc-linux-gnu.tar.bz2"/>
<param name="gcc_version" value="${AVRGCC-VERSION}"/>
<param name="avrdude_archive_file" value="avrdude-${AVRDUDE-VERSION}-powerpc64le-pc-linux-gnu.tar.bz2"/>
<param name="avrdude_version" value="${AVRDUDE-VERSION}"/>
<param name="arduinoOTA_archive_file" value="arduinoOTA-${arduinoOTA-VERSION}-linux_ppc64le.tar.bz2"/>
<param name="arduinoOTA_version" value="${arduinoOTA-VERSION}"/>
</antcall>
</target>
<target name="linux32-build" depends="linux-libastyle-x86" description="Build linux (32-bit) version">
<antcall target="linux-jvm-${linux-bundle-jvm-task}">
<param name="JVM" value="${LINUX32_BUNDLED_JVM}"/>
@ -819,6 +874,8 @@
<target name="linuxaarch64-run" depends="build,start"/>
<target name="linuxppc64le-run" depends="build,start"/>
<target name="linux32-start">
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>
@ -835,6 +892,10 @@
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>
<target name="linuxppc64le-start">
<exec executable="./linux/work/arduino" spawn="false" failonerror="true"/>
</target>
<target name="build-arduino-builder" unless="no_arduino_builder">
<delete dir="${staging_folder}/arduino-builder-${platform}" includeemptydirs="true"/>
<mkdir dir="${staging_folder}/arduino-builder-${platform}"/>
@ -969,6 +1030,9 @@
<target name="linuxaarch64-dist" depends="linux-dist"
description="Build .tar.xz of linux aarch64 version" />
<target name="linuxppc64le-dist" depends="linux-dist"
description="Build .tar.xz of linux ppc64le version" />
<!-- - - - - - - - -->
<!-- Windows -->
<!-- - - - - - - - -->