mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-12-23 03:53:43 +01:00
ppc32: ppc64: use AC_COMPILE_IFELSE to test __powerpc64__ macro for ppc64
powerpc64 compilers on RHEL 6.3 (and my own built locally) do not default to 32bit. Actually check for the bit mode.
This commit is contained in:
parent
d00b621090
commit
9d42e1c381
1 changed files with 7 additions and 7 deletions
14
configure.in
14
configure.in
|
@ -70,12 +70,6 @@ PT_STEP, PT_SYSCALL], [], [],
|
|||
dnl Checks for library functions.
|
||||
AC_CHECK_FUNCS(dl_iterate_phdr dl_phdr_removals_counter dlmodinfo getunwind \
|
||||
ttrace mincore)
|
||||
is_gcc_m64() {
|
||||
if test `echo $CFLAGS | grep "\-m64" -c` -eq 1 ; then echo ppc64;
|
||||
else
|
||||
if test `echo $CC | grep "\-m64" -c` -eq 1 ; then echo ppc64; else echo ppc32; fi;
|
||||
fi;
|
||||
}
|
||||
|
||||
is_gcc_altivec() {
|
||||
if test `echo $CFLAGS | grep "\-maltivec" -c` -eq 1 ; then echo has_altivec;
|
||||
|
@ -93,13 +87,19 @@ else
|
|||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
|
||||
#ifndef __powerpc64__
|
||||
# error choke
|
||||
#endif
|
||||
]])], [ppc_bits=64], [ppc_bits=32])
|
||||
|
||||
get_arch() {
|
||||
case "$1" in
|
||||
arm*) echo arm;;
|
||||
i?86) echo x86;;
|
||||
hppa*) echo hppa;;
|
||||
mips*) echo mips;;
|
||||
powerpc*) is_gcc_m64;;
|
||||
powerpc*) echo ppc$ppc_bits;;
|
||||
amd64) echo x86_64;;
|
||||
*) echo $1;;
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue