If we are building for a non-native ARM, then we may need to select a cross-compiler based on the -a paramter.
Signed-off-by: Jordan Justen <jordan.l.jus...@intel.com> --- OvmfPkg/build.sh | 99 +++++++++++++++++++++++++----------------------- 1 file changed, 51 insertions(+), 48 deletions(-) diff --git a/OvmfPkg/build.sh b/OvmfPkg/build.sh index 217abae683..812441b9b1 100755 --- a/OvmfPkg/build.sh +++ b/OvmfPkg/build.sh @@ -40,58 +40,11 @@ ARCH_X64=no BUILDTARGET=DEBUG BUILD_OPTIONS= PLATFORMFILE= +TARGET_TOOLS= THREADNUMBER=1 LAST_ARG= RUN_QEMU=no -# -# Pick a default tool type for a given OS -# -TARGET_TOOLS=MYTOOLS -case `uname` in - CYGWIN*) - echo Cygwin not fully supported yet. - ;; - Darwin*) - Major=$(uname -r | cut -f 1 -d '.') - # Major is Darwin version, not OS X version. - # OS X Yosemite 10.10.2 returns 14. - case $Major in - [156789]) - echo OvmfPkg requires OS X Snow Leopard 10.6 or newer OS - exit 1 - ;; - 10) - TARGET_TOOLS=XCODE32 - ;; - 1[12]) - TARGET_TOOLS=XCLANG - ;; - *) - # Mavericks and future assume XCODE5 (clang + lldb) - TARGET_TOOLS=XCODE5 - ;; - esac - ;; - Linux*) - gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}') - case $gcc_version in - [1-3].*|4.[0-7].*) - echo OvmfPkg requires GCC4.8 or later - exit 1 - ;; - 4.8.*) - TARGET_TOOLS=GCC48 - ;; - 4.9.*|6.[0-2].*) - TARGET_TOOLS=GCC49 - ;; - *) - TARGET_TOOLS=GCC5 - ;; - esac -esac - # # Scan command line to override defaults # @@ -166,6 +119,56 @@ else BUILD_ROOT_ARCH=X64 fi +# +# Pick a default tool type for a given OS +# +if [ -z "$TARGET_TOOLS" ]; then + TARGET_TOOLS=MYTOOLS + case `uname` in + CYGWIN*) + echo Cygwin not fully supported yet. + ;; + Darwin*) + Major=$(uname -r | cut -f 1 -d '.') + # Major is Darwin version, not OS X version. + # OS X Yosemite 10.10.2 returns 14. + case $Major in + [156789]) + echo OvmfPkg requires OS X Snow Leopard 10.6 or newer OS + exit 1 + ;; + 10) + TARGET_TOOLS=XCODE32 + ;; + 1[12]) + TARGET_TOOLS=XCLANG + ;; + *) + # Mavericks and future assume XCODE5 (clang + lldb) + TARGET_TOOLS=XCODE5 + ;; + esac + ;; + Linux*) + gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}') + case $gcc_version in + [1-3].*|4.[0-7].*) + echo OvmfPkg requires GCC4.8 or later + exit 1 + ;; + 4.8.*) + TARGET_TOOLS=GCC48 + ;; + 4.9.*|6.[0-2].*) + TARGET_TOOLS=GCC49 + ;; + *) + TARGET_TOOLS=GCC5 + ;; + esac + esac +fi + case $PROCESSOR in IA32) if [ -n "$QEMU_COMMAND" ]; then -- 2.20.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#38799): https://edk2.groups.io/g/devel/message/38799 Mute This Topic: https://groups.io/mt/31017201/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-