Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(98)

Side by Side Diff: pnacl/build.sh

Issue 9979025: [MIPS] Adding validator for MIPS architecture. (Closed) Base URL: http://src.chromium.org/native_client/trunk/src/native_client/
Patch Set: Rebased patch, conflict resolved. Created 8 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « SConstruct ('k') | site_scons/site_tools/naclsdk.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/bin/bash
2 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 2 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 # 5 #
6 #@ Untrusted Toolchain Manager 6 #@ Untrusted Toolchain Manager
7 #@------------------------------------------------------------------- 7 #@-------------------------------------------------------------------
8 #@ This script builds the ARM and PNaCl untrusted toolchains. 8 #@ This script builds the ARM and PNaCl untrusted toolchains.
9 #@ It MUST be run from the native_client/ directory. 9 #@ It MUST be run from the native_client/ directory.
10 ###################################################################### 10 ######################################################################
(...skipping 1762 matching lines...) Expand 10 before | Expand all | Expand 10 after
1773 # libstdc++ installs a file with an abnormal name: "libstdc++*-gdb.py" 1773 # libstdc++ installs a file with an abnormal name: "libstdc++*-gdb.py"
1774 # The asterisk may be due to a bug in libstdc++ Makefile/configure. 1774 # The asterisk may be due to a bug in libstdc++ Makefile/configure.
1775 # This causes problems on the Windows bot (during cleanup, toolchain 1775 # This causes problems on the Windows bot (during cleanup, toolchain
1776 # directory delete fails due to the bad character). 1776 # directory delete fails due to the bad character).
1777 # Rename it to get rid of the asterisk. 1777 # Rename it to get rid of the asterisk.
1778 spushd "${LIBSTDCPP_INSTALL_DIR}/lib" 1778 spushd "${LIBSTDCPP_INSTALL_DIR}/lib"
1779 mv -f libstdc++'*'-gdb.py libstdc++-gdb.py 1779 mv -f libstdc++'*'-gdb.py libstdc++-gdb.py
1780 spopd 1780 spopd
1781 } 1781 }
1782 1782
1783 build-validator() {
1784 arch=$1
1785 if [ ${arch} == 'mips' ]; then
1786 targetplatform='mips32'
1787 else
1788 targetplatform=$arch
1789 fi
1790 ARCH=`echo ${arch} | tr '[:lower:]' '[:upper:]'`
1791 TARGETPLATFORM=`echo ${targetplatform} | tr '[:lower:]' '[:upper:]'`
1792 StepBanner "MISC-"${ARCH} "Building validator ("${TARGETPLATFORM}")"
1793 spushd "${NACL_ROOT}"
1794 RunWithLog ${arch}_ncval_core \
1795 ./scons MODE=opt-host \
1796 targetplatform=${targetplatform} \
1797 sysinfo=0 \
1798 ${arch}-ncval-core
1799 cp ${SCONS_OUT}/opt-linux-x86-32-to-${targetplatform}/obj/src/trusted/\
1800 validator_${arch}/${arch}-ncval-core ${INSTALL_ROOT}/tools-x86
1801 spopd
1802 }
1803
1783 #+ misc-tools - Build and install sel_ldr and validator for ARM. 1804 #+ misc-tools - Build and install sel_ldr and validator for ARM.
1784 misc-tools() { 1805 misc-tools() {
1785 if ${PNACL_BUILD_ARM} ; then 1806 if ${PNACL_BUILD_ARM} ; then
1786 StepBanner "MISC-ARM" "Building sel_ldr (ARM)" 1807 StepBanner "MISC-ARM" "Building sel_ldr (ARM)"
1787 1808
1788 # TODO(robertm): revisit some of these options 1809 # TODO(robertm): revisit some of these options
1789 spushd "${NACL_ROOT}" 1810 spushd "${NACL_ROOT}"
1790 RunWithLog arm_sel_ldr \ 1811 RunWithLog arm_sel_ldr \
1791 ./scons MODE=opt-host \ 1812 ./scons MODE=opt-host \
1792 platform=arm \ 1813 platform=arm \
1793 naclsdk_validate=0 \ 1814 naclsdk_validate=0 \
1794 sysinfo=0 \ 1815 sysinfo=0 \
1795 sel_ldr 1816 sel_ldr
1796 rm -rf "${INSTALL_ROOT}/tools-arm" 1817 rm -rf "${INSTALL_ROOT}/tools-arm"
1797 mkdir "${INSTALL_ROOT}/tools-arm" 1818 mkdir "${INSTALL_ROOT}/tools-arm"
1798 local sconsdir="${SCONS_OUT}/opt-${SCONS_BUILD_PLATFORM}-arm" 1819 local sconsdir="${SCONS_OUT}/opt-${SCONS_BUILD_PLATFORM}-arm"
1799 cp "${sconsdir}/obj/src/trusted/service_runtime/sel_ldr" \ 1820 cp "${sconsdir}/obj/src/trusted/service_runtime/sel_ldr" \
1800 "${INSTALL_ROOT}/tools-arm" 1821 "${INSTALL_ROOT}/tools-arm"
1801 spopd 1822 spopd
1802 else 1823 else
1803 StepBanner "MISC-ARM" "Skipping ARM sel_ldr (No trusted ARM toolchain)" 1824 StepBanner "MISC-ARM" "Skipping ARM sel_ldr (No trusted ARM toolchain)"
1804 fi 1825 fi
1805 1826
1806 if ${BUILD_PLATFORM_LINUX} ; then 1827 if ${BUILD_PLATFORM_LINUX} ; then
1807 StepBanner "MISC-ARM" "Building validator (ARM)"
1808 spushd "${NACL_ROOT}"
1809 RunWithLog arm_ncval_core \
1810 ./scons MODE=opt-host \
1811 targetplatform=arm \
1812 sysinfo=0 \
1813 arm-ncval-core
1814 rm -rf "${INSTALL_ROOT}/tools-x86" 1828 rm -rf "${INSTALL_ROOT}/tools-x86"
1815 mkdir "${INSTALL_ROOT}/tools-x86" 1829 mkdir "${INSTALL_ROOT}/tools-x86"
1816 cp ${SCONS_OUT}/opt-linux-x86-32-to-arm/obj/src/trusted/validator_arm/\ 1830 for target in arm mips; do
1817 arm-ncval-core ${INSTALL_ROOT}/tools-x86 1831 build-validator $target
1818 spopd 1832 done
1819 else 1833 else
1820 StepBanner "MISC-ARM" "Skipping ARM validator (Not yet supported on Mac)" 1834 for target in ARM MIPS; do
1835 StepBanner "MISC-"${target} "Skipping " ${target} " validator (Not yet sup ported on Mac)"
1836 done
1821 fi 1837 fi
1822 } 1838 }
1823 1839
1824 ######################################################################### 1840 #########################################################################
1825 # < LIBELF > 1841 # < LIBELF >
1826 ######################################################################### 1842 #########################################################################
1827 #+ libelf-host - Build and install libelf (using the host CC) 1843 #+ libelf-host - Build and install libelf (using the host CC)
1828 libelf-host() { 1844 libelf-host() {
1829 StepBanner "LIBELF-HOST" "Building and installing libelf" 1845 StepBanner "LIBELF-HOST" "Building and installing libelf"
1830 1846
(...skipping 2015 matching lines...) Expand 10 before | Expand all | Expand 10 after
3846 #Usage 3862 #Usage
3847 echo "ERROR: unknown function '$1'." >&2 3863 echo "ERROR: unknown function '$1'." >&2
3848 echo "For help, try:" 3864 echo "For help, try:"
3849 echo " $0 help" 3865 echo " $0 help"
3850 exit 1 3866 exit 1
3851 fi 3867 fi
3852 3868
3853 hg-migrate 3869 hg-migrate
3854 3870
3855 "$@" 3871 "$@"
OLDNEW
« no previous file with comments | « SConstruct ('k') | site_scons/site_tools/naclsdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698