summaryrefslogtreecommitdiffstats
path: root/DuetPkg
diff options
context:
space:
mode:
authorJordan Justen <jordan.l.justen@intel.com>2016-04-06 00:39:17 -0700
committerLaszlo Ersek <lersek@redhat.com>2016-04-08 13:47:19 +0200
commit912065fe704aa3e74110a1446c13e1a76d5be231 (patch)
tree7b683be0246bc3164e0a1c0ef7b58c996ca91891 /DuetPkg
parent77833d0b649f5daa5a03cb8ddea3c2048031b583 (diff)
downloadedk2-912065fe704aa3e74110a1446c13e1a76d5be231.tar.gz
edk2-912065fe704aa3e74110a1446c13e1a76d5be231.tar.bz2
edk2-912065fe704aa3e74110a1446c13e1a76d5be231.zip
DuetPkg scripts: Support building with GCC45 - GCC49
Build tested with GCC 5.3 with both IA32 and X64. Unfortunately both seemed to hang very early when boot tested on QEMU. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Cc: Ruiyu Ni <ruiyu.ni@intel.com> Reviewed-by: Ruiyu Ni <ruiyu.ni@Intel.com>
Diffstat (limited to 'DuetPkg')
-rwxr-xr-xDuetPkg/PostBuild.sh8
-rwxr-xr-xDuetPkg/build32.sh24
-rwxr-xr-xDuetPkg/build64.sh24
3 files changed, 48 insertions, 8 deletions
diff --git a/DuetPkg/PostBuild.sh b/DuetPkg/PostBuild.sh
index c77c0f3455..f032de3a9d 100755
--- a/DuetPkg/PostBuild.sh
+++ b/DuetPkg/PostBuild.sh
@@ -6,7 +6,7 @@
# and platform building, so just use a sh file to do post build commands.
# Originally, following post building command is for EfiLoader module.
#
-# 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
@@ -53,11 +53,11 @@ case "$2" in
UNIXGCC)
export TOOLTAG=UNIXGCC
;;
- GCC44)
- export TOOLTAG=GCC44
+ GCC4*)
+ export TOOLTAG=$2
;;
*)
- echo Invalid tool tag, should be only UNIXGCC or GCC44
+ echo Invalid tool tag, should be only UNIXGCC or GCC4\*
return 1
esac
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
diff --git a/DuetPkg/build64.sh b/DuetPkg/build64.sh
index d215116f9e..0401c56e12 100755
--- a/DuetPkg/build64.sh
+++ b/DuetPkg/build64.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
@@ -56,7 +56,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