aboutsummaryrefslogtreecommitdiff
path: root/build-gcc
diff options
context:
space:
mode:
authorLuis Lozano <llozano@chromium.org>2013-03-15 14:44:13 -0700
committerChromeBot <chrome-bot@google.com>2013-03-15 15:51:37 -0700
commitf81680c018729fd4499e1e200d04b48c4b90127c (patch)
tree940608da8374604b82edfdb2d7df55d065f05d4c /build-gcc
parent2296ee0b914aba5bba07becab4ff68884ce9b8a5 (diff)
downloadtoolchain-utils-f81680c018729fd4499e1e200d04b48c4b90127c.tar.gz
Cleaned up directory after copy of tools from perforce directory
Got rid of stale copies of some tools like "crosperf" and moved all files under v14 directory (that came from perforce) into the top directory. BUG=None TEST=None Change-Id: I408d17a36ceb00e74db71403d2351fd466a14f8e Reviewed-on: https://gerrit-int.chromium.org/33887 Tested-by: Luis Lozano <llozano@chromium.org> Reviewed-by: Yunlian Jiang <yunlian@google.com> Commit-Queue: Luis Lozano <llozano@chromium.org>
Diffstat (limited to 'build-gcc')
-rw-r--r--build-gcc/opts.sh40
1 files changed, 40 insertions, 0 deletions
diff --git a/build-gcc/opts.sh b/build-gcc/opts.sh
new file mode 100644
index 00000000..d1e6fadb
--- /dev/null
+++ b/build-gcc/opts.sh
@@ -0,0 +1,40 @@
+get_gcc_configure_options()
+{
+ local CTARGET=$1; shift
+ local confgcc=$(get_gcc_common_options)
+ case ${CTARGET} in
+ arm*) #264534
+ local arm_arch="${CTARGET%%-*}"
+ # Only do this if arm_arch is armv*
+ if [[ ${arm_arch} == armv* ]] ; then
+ # Convert armv7{a,r,m} to armv7-{a,r,m}
+ [[ ${arm_arch} == armv7? ]] && arm_arch=${arm_arch/7/7-}
+ # Remove endian ('l' / 'eb')
+ [[ ${arm_arch} == *l ]] && arm_arch=${arm_arch%l}
+ [[ ${arm_arch} == *eb ]] && arm_arch=${arm_arch%eb}
+ confgcc="${confgcc} --with-arch=${arm_arch}"
+ confgcc="${confgcc} --disable-esp"
+ fi
+ ;;
+ i?86*)
+ # Hardened is enabled for x86, but disabled for ARM.
+ confgcc="${confgcc} --with-arch=atom"
+ confgcc="${confgcc} --enable-esp"
+ ;;
+ esac
+ echo ${confgcc}
+}
+
+get_gcc_common_options()
+{
+ local confgcc
+ # TODO(asharif): Build without these options.
+ confgcc="${confgcc} --disable-libmudflap"
+ confgcc="${confgcc} --disable-libssp"
+ confgcc="${confgcc} --disable-libgomp"
+ confgcc="${confgcc} --enable-__cxa_atexit"
+ confgcc="${confgcc} --enable-checking=release"
+ confgcc="${confgcc} --disable-libquadmath"
+ echo ${confgcc}
+}
+