[LLVMdev] small patch for llvm configure.ac

Reid Spencer reid at x10sys.com
Wed Dec 22 22:20:17 PST 2004


On Wed, 2004-12-22 at 22:09, Markus F.X.J. Oberhumer wrote:
> Below you will find a small patch for llvm/autoconf/configure.ac that fixes 
> wrong AC_SUBST usage and adds AMD64 detection. Please review.
> 
> ~Markus


> --- autoconf/configure.ac       22 Dec 2004 05:56:56 -0000      1.147
> +++ autoconf/configure.ac       23 Dec 2004 06:06:04 -0000
> @@ -139,7 +139,8 @@
>  dnl the OS.
>  AC_CACHE_CHECK([target architecture],[llvm_cv_target_arch],
>  [case $target in
> -  i*86-*)      llvm_cv_target_arch="x86" ;;
> +  amd64-* | x86_64-*) llvm_cv_target_arch="amd64" ;;
> +  i?86-*)      llvm_cv_target_arch="x86" ;;

This change looks fine. I'll commit this part.

>    sparc*-*)    llvm_cv_target_arch="Sparc" ;;
>    powerpc*-*)  llvm_cv_target_arch="PowerPC" ;;
>    *)           llvm_cv_target_arch="Unknown" ;;
> @@ -167,7 +168,7 @@
>  if test ${enableval} = "no" ; then
>    AC_SUBST(ENABLE_OPTIMIZED,[[]])
>  else
> -  AC_SUBST(ENABLE_OPTIMIZED,[[ENABLE_OPTIMIZED=1]])
> +  AC_SUBST(ENABLE_OPTIMIZED,[[1]])

This is not okay, at least not without other changes. We do some weird
things in Makefile.config.in where these values are used that I've been
meaning to clean up so that the "correct" usage you show above is used.
However, until those changes are made, I can't commit this because it
will break the LLVM makefile system.


>  fi
>  
>  dnl --enable-jit: check whether they want to enable the jit
> @@ -180,9 +181,9 @@
>    AC_SUBST(JIT,[[]])
>  else
>    case "$llvm_cv_target_arch" in
> -    x86)     AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) ;;
> -    Sparc)   AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) ;;
> -    PowerPC) AC_SUBST(JIT,[[TARGET_HAS_JIT=1]]) ;;
> +    x86)     AC_SUBST(JIT,[[1]]) ;;
> +    Sparc)   AC_SUBST(JIT,[[1]]) ;;
> +    PowerPC) AC_SUBST(JIT,[[1]]) ;;

I can't make these changes for the same reason as described above. Also,
I think you want to add an amd64 case here, don't you?

>      *)       AC_SUBST(JIT,[[]]) ;;
>    esac
>  fi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20041222/488c1a59/attachment.sig>


More information about the llvm-dev mailing list