[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Libunwind-devel] [PATCH 01/17] ppc32: ppc64: use AC_COMPILE_IFELSE to t
From: |
Cody P Schafer |
Subject: |
[Libunwind-devel] [PATCH 01/17] ppc32: ppc64: use AC_COMPILE_IFELSE to test __powerpc64__ macro for ppc64 |
Date: |
Fri, 14 Sep 2012 17:11:46 -0700 |
powerpc64 compilers on RHEL 6.3 (and my own built locally) do not
default to 32bit. Actually check for the bit mode.
---
configure.in | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/configure.in b/configure.in
index 2caceff..ca94068 100644
--- a/configure.in
+++ b/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
--
1.7.11.3
- [Libunwind-devel] [PATCH v3 00/17] Fixup the PowerPC (64 & 32 bit) builds & clean up configure, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 01/17] ppc32: ppc64: use AC_COMPILE_IFELSE to test __powerpc64__ macro for ppc64,
Cody P Schafer <=
- [Libunwind-devel] [PATCH 02/17] ppc32: remove unused dmy_vrregset, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 05/17] build: make libunwind-coredump build optional, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 04/17] ppc32: ppc64: test altivec support by running the compiler., Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 06/17] configure: use AS_HELP_STRING for configure args instead of manual formating, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 07/17] ppc64: remove tests/ppc64-test-wchar, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 08/17] configure: avoid using a shell function in autoconf, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 16/17] ptrace: check for NULL arg., Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 14/17] configure: rename configure.in to configure.ac, Cody P Schafer, 2012/09/14
- [Libunwind-devel] [PATCH 11/17] UPT: Add reg offsets for ppc32/64, Cody P Schafer, 2012/09/14