diff --git a/EmulatorPkg/build.sh b/EmulatorPkg/build.sh index e031c3ee00..06ec37a4c1 100755 --- a/EmulatorPkg/build.sh +++ b/EmulatorPkg/build.sh @@ -81,6 +81,20 @@ case `uname` in HOST_PROCESSOR=X64 ;; esac + + gcc_version=$(gcc -v 2>&1 | tail -1 | awk '{print $3}') + case $gcc_version in + 4.5.*) + TARGET_TOOLS=GCC45 + ;; + 4.6.*) + TARGET_TOOLS=GCC46 + ;; + *) + TARGET_TOOLS=GCC44 + exit 1 + ;; + esac ;; esac