diff options
author | Jim Wilson <jim.wilson@linaro.org> | 2015-04-09 14:33:26 -0700 |
---|---|---|
committer | Jim Wilson <jim.wilson@linaro.org> | 2015-04-13 15:46:00 -0700 |
commit | 413ec6953b86b4f6bbecb392797381d952332dba (patch) | |
tree | aa9d705a4f1d9a400c5ece34f6a1c46699b5df07 /config/gcc.conf | |
parent | c42fcc3962152dd7fd563bf2bbbd35502e80ec69 (diff) |
Add --mcpu and --mtune options, and make --march work.
Change-Id: Ifb46d87cb136230b6a3a922f62586d7fd4fa88ef
Diffstat (limited to 'config/gcc.conf')
-rw-r--r-- | config/gcc.conf | 62 |
1 files changed, 52 insertions, 10 deletions
diff --git a/config/gcc.conf b/config/gcc.conf index af67f188..457d9b66 100644 --- a/config/gcc.conf +++ b/config/gcc.conf @@ -15,7 +15,7 @@ latest="gcc.git~linaro-4.9-branch" static_link="no" # This is a list of default flags always supplied to configure -default_configure_flags="--with-bugurl=https://bugs.linaro.org --with-mpc=${local_builds}/destdir/${host} --with-mpfr=${local_builds}/destdir/${host} --with-gmp=${local_builds}/destdir/${host} --with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --disable-libmudflap${default_march:+ --with-arch=${default_march}}" +default_configure_flags="--with-bugurl=https://bugs.linaro.org --with-mpc=${local_builds}/destdir/${host} --with-mpfr=${local_builds}/destdir/${host} --with-gmp=${local_builds}/destdir/${host} --with-gnu-as --with-gnu-ld --disable-libstdcxx-pch --disable-libmudflap${override_arch:+ --with-arch=${override_arch}}${override_cpu:+ --with-cpu=${override_cpu}}${override_tune:+ --with-tune=${override_tune}}" # --with-pkgversion=${USER} # --with-as=${local_builds}/bin/${target}-as --with-ld=${local_builds}/bin/${target}-ld @@ -74,29 +74,65 @@ if test x"${build}" != x"${target}"; then # Add platform specific flags case ${target} in arm-*linux-gnueabi) - default_configure_flags="${default_configure_flags} --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb" + if test x"${override_cpu}" = x -a x"${override_tune}" = x; then + default_configure_flags="${default_configure_flags} --with-tune=cortex-a9" + fi + if test x"${override_arch}" = x -a x"${override_cpu}" = x; then + default_configure_flags="${default_configure_flags} --with-arch=armv7-a" + fi + default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb" ;; arm-*linux-gnueabihf) - default_configure_flags="${default_configure_flags} --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb" + if test x"${override_cpu}" = x -a x"${override_tune}" = x; then + default_configure_flags="${default_configure_flags} --with-tune=cortex-a9" + fi + if test x"${override_arch}" = x -a x"${override_cpu}" = x; then + default_configure_flags="${default_configure_flags} --with-arch=armv7-a" + fi + default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb" ;; armeb-*linux-gnueabi) - default_configure_flags="${default_configure_flags} --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb --disable-multilib" + if test x"${override_cpu}" = x -a x"${override_tune}" = x; then + default_configure_flags="${default_configure_flags} --with-tune=cortex-a9" + fi + if test x"${override_arch}" = x -a x"${override_cpu}" = x; then + default_configure_flags="${default_configure_flags} --with-arch=armv7-a" + fi + default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb --disable-multilib" ;; armeb-*linux-gnueabihf) - default_configure_flags="${default_configure_flags} --with-tune=cortex-a9 --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-multilib" + if test x"${override_cpu}" = x -a x"${override_tune}" = x; then + default_configure_flags="${default_configure_flags} --with-tune=cortex-a9" + fi + if test x"${override_arch}" = x -a x"${override_cpu}" = x; then + default_configure_flags="${default_configure_flags} --with-arch=armv7-a" + fi + default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-multilib" ;; # bare metal targets don't support threads. arm*-elf|arm*-eabi*) - default_configure_flags="${default_configure_flags} --with-tune=cortex-a9 --enable-threads=no --with-arch=armv7-a --with-fpu=vfpv3-d16" + if test x"${override_cpu}" = x -a x"${override_tune}" = x; then + default_configure_flags="${default_configure_flags} --with-tune=cortex-a9" + fi + if test x"${override_arch}" = x -a x"${override_cpu}" = x; then + default_configure_flags="${default_configure_flags} --with-arch=armv7-a" + fi + default_configure_flags="${default_configure_flags} ---enable-threads=no --with-fpu=vfpv3-d16" languages="c,c++,lto" ;; aarch64*-*elf) + if test x"${override_arch}" = x -a x"${override_cpu}" = x; then + default_configure_flags="${default_configure_flags} --with-arch=armv8-a" + fi + # LDFLAGS_FOR_TARGET=-static # Gfortran doesn't cross configure, just native - default_configure_flags="${default_configure_flags} --with-arch=armv8-a" # LDFLAGS_FOR_TARGET=-static languages="c,c++,lto" ;; aarch64*-linux-gnu) - default_configure_flags="${default_configure_flags} --with-arch=armv8-a" # LDFLAGS_FOR_TARGET=-static + if test x"${override_arch}" = x -a x"${override_cpu}" = x; then + default_configure_flags="${default_configure_flags} --with-arch=armv8-a" + fi + # LDFLAGS_FOR_TARGET=-static ;; *-mingw32) languages="c,c++" @@ -173,10 +209,16 @@ else fi case ${target} in arm*-none-linux-gnueabi) - default_configure_flags="${default_configure_flags} --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb " + if test x"${override_arch}" = x -a x"${override_cpu}" = x; then + default_configure_flags="${default_configure_flags} --with-arch=armv7-a" + fi + default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=softfp --with-mode=thumb " ;; arm*-linux-gnueabihf) - default_configure_flags="${default_configure_flags} --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb" + if test x"${override_arch}" = x -a x"${override_cpu}" = x; then + default_configure_flags="${default_configure_flags} --with-arch=armv7-a" + fi + default_configure_flags="${default_configure_flags} --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb" ;; arm*-eabi | aarch64*-*elf) #default_configure_flags="${default_configure_flags}" |