diff options
author | Werner Koch <wk@gnupg.org> | 2014-01-09 19:14:09 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2014-01-24 15:24:10 +0100 |
commit | 24e65d715812cea28732397870cb1585b8435521 (patch) | |
tree | 07f4c645b444730daa291cc1938e8f18b6f42051 /mpi | |
parent | 4ad3417acab5021db1f722c314314ce4b781833a (diff) | |
download | libgcrypt-24e65d715812cea28732397870cb1585b8435521.tar.gz |
Check compiler features only for the relevant platform.
* mpi/config.links (mpi_cpu_arch): Always set for ARM. Set for HPPA.
Set to "undefined" for unknown platforms.
(try_asm_modules): Act upon only after having detected the CPU.
* configure.ac: Move the call to config.links before the platform
specific compiler checks. Check platform specific features only if
the platform is targeted.
--
There is no need to check x86 options if we are targeting ARM and vice
versa. This may only introduce build problems. With this patch the
summary output at the end of the compiler also shows more reasonable
messages.
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit 04d478d9b0f92d80105ddaf2c011f40ae8260cfb)
Diffstat (limited to 'mpi')
-rw-r--r-- | mpi/config.links | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/mpi/config.links b/mpi/config.links index a79b03ba..57e6c2a0 100644 --- a/mpi/config.links +++ b/mpi/config.links @@ -21,6 +21,10 @@ # sourced by ../configure to get the list of files to link # this should set $mpi_ln_list. # Note: this is called from the above directory. +# +# Reguired variables: +# $ac_cv_sys_symbol_underscore +# $gcry_cv_gcc_arm_platform_as_ok mpi_sflags= mpi_extra_modules= @@ -39,7 +43,6 @@ mpi_optional_modules=`$AWK '/^#BEGIN_ASM_LIST/,/^#END_ASM_LIST/ { echo '/* created by config.links - do not edit */' >./mpi/asm-syntax.h echo "/* Host: ${host} */" >>./mpi/asm-syntax.h -if test "$try_asm_modules" = "yes" ; then case "${host}" in powerpc-apple-darwin* | \ i[34567]86*-*-openbsd[12]* | \ @@ -142,10 +145,10 @@ case "${host}" in mpi_cpu_arch="aarch64" ;; arm*-*-*) + mpi_cpu_arch="arm" if test "$gcry_cv_gcc_arm_platform_as_ok" = "yes" ; then echo '/* configured for arm */' >>./mpi/asm-syntax.h path="arm" - mpi_cpu_arch="arm" else echo '/* No assembler modules configured */' >>./mpi/asm-syntax.h path="" @@ -155,16 +158,19 @@ case "${host}" in echo '/* configured for HPPA (pa7000) */' >>./mpi/asm-syntax.h path="hppa1.1 hppa" mpi_extra_modules="udiv-qrnnd" + mpi_cpu_arch="hppa" ;; hppa1.0*-*-*) echo '/* configured for HPPA 1.0 */' >>./mpi/asm-syntax.h path="hppa" mpi_extra_modules="udiv-qrnnd" + mpi_cpu_arch="hppa" ;; hppa*-*-*) # assume pa7100 echo '/* configured for HPPA (pa7100) */' >>./mpi/asm-syntax.h path="pa7100 hppa1.1 hppa" mpi_extra_modules="udiv-qrnnd" + mpi_cpu_arch="hppa" ;; sparc64-*-linux-gnu) echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h @@ -300,6 +306,7 @@ case "${host}" in mpi_sflags="-Wa,-mpwr" path="power" mpi_extra_modules="udiv-w-sdiv" + mpi_cpu_arch="ppc" ;; rs6000-*-* | \ power-*-* | \ @@ -333,13 +340,23 @@ case "${host}" in mpi_cpu_arch="ppc" ;; *) - echo '/* No assembler modules configured */' >>./mpi/asm-syntax.h + echo '/* Platform not known */' >>./mpi/asm-syntax.h path="" ;; esac -else - echo '/* Assembler modules disabled on request */' >>./mpi/asm-syntax.h + +# If asm modules are disabled reset the found variables but keep +# mpi_cpu_arch. +if test "$try_asm_modules" != "yes" ; then + echo '/* Assembler modules disabled on request */' >./mpi/asm-syntax.h path="" + mpi_sflags="" + mpi_extra_modules="" +fi + +# Make sure that mpi_cpu_arch is not the empty string. +if test x"$mpi_cpu_arch" = x ; then + mpi_cpu_arch="unknown" fi |