From b5cd2461caacc488ee231f21bef4cda77dae6562 Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Tue, 18 Dec 2007 23:01:19 +0000 Subject: [PATCH] * m4/general.m4 (CL_CANONICAL_HOST_CPU): Force host_cpu=rs6000 for powerpc64 if userland is 32 bit. --- ChangeLog | 5 +++++ m4/general.m4 | 16 ++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/ChangeLog b/ChangeLog index ef0a858..43e664c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-12-19 Richard B. Kreckel + + * m4/general.m4 (CL_CANONICAL_HOST_CPU): Force host_cpu=rs6000 for + powerpc64 if userland is 32 bit. + 2007-12-18 Richard B. Kreckel * autoconf/ltmain.sh: Update to libtool-1.5.24. diff --git a/m4/general.m4 b/m4/general.m4 index bb2f436..d0ce215 100644 --- a/m4/general.m4 +++ b/m4/general.m4 @@ -201,6 +201,22 @@ else host_cpu=i386 fi ;; +dnl PowerPC64 is another case where 'uname -m' and userland may disagree. + powerpc64 ) + AC_CACHE_CHECK([for 64-bit userland on PowerPC64], cl_cv_host_powerpc64, [ +AC_COMPILE_IFELSE([AC_LANG_PROGRAM( +[[#if !defined __powerpc64__ +# error __powerpc64__ not defined +#endif +]]) +], [cl_cv_host_powerpc64=yes], [cl_cv_host_powerpc64=no]) +]) +if test $cl_cv_host_powerpc64 = yes; then + host_cpu=powerpc64 +else + host_cpu=rs6000 +fi + ;; esac dnl was AC_DEFINE_UNQUOTED(__${host_cpu}__) but KAI C++ 3.2d doesn't like this cat >> confdefs.h <