summaryrefslogtreecommitdiffstats
path: root/DuetPkg/build32.sh
diff options
context:
space:
mode:
Diffstat (limited to 'DuetPkg/build32.sh')
-rwxr-xr-xDuetPkg/build32.sh24
1 files changed, 22 insertions, 2 deletions
diff --git a/DuetPkg/build32.sh b/DuetPkg/build32.sh
index 5e99aba52f..c15c9963f8 100755
--- a/DuetPkg/build32.sh
+++ b/DuetPkg/build32.sh
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>
-# Copyright (c) 2010, Intel Corporation. All rights reserved.<BR>
+# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -57,7 +57,27 @@ case `uname` in
fi
;;
Linux*)
- TARGET_TOOLS=GCC44
+ 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
+ ;;
+ 4.7.*)
+ TARGET_TOOLS=GCC47
+ ;;
+ 4.8.*)
+ TARGET_TOOLS=GCC48
+ ;;
+ 4.9.*|4.1[0-9].*|5.*.*)
+ TARGET_TOOLS=GCC49
+ ;;
+ *)
+ TARGET_TOOLS=GCC44
+ ;;
+ esac
;;
esac