summaryrefslogtreecommitdiffstats
path: root/m4
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2013-05-30 14:37:38 +0200
committerJan Kratochvil <jan.kratochvil@redhat.com>2013-11-07 21:39:00 +0100
commit0b867460075c9f02cb305abc91a0e12b90017583 (patch)
tree28f799db9b0eef70d0b4b5e81163b2fc62903470 /m4
parentdwfl_core_file_report: Remove the use of MAX. (diff)
downloadelfutils-0b867460075c9f02cb305abc91a0e12b90017583.tar.gz
elfutils-0b867460075c9f02cb305abc91a0e12b90017583.tar.bz2
elfutils-0b867460075c9f02cb305abc91a0e12b90017583.tar.xz
Unwinder for x86*.
Signed-off-by: Jan Kratochvil <jan.kratochvil@redhat.com> Signed-off-by: Mark Wielaard <mjw@redhat.com>
Diffstat (limited to 'm4')
-rw-r--r--m4/ChangeLog4
-rw-r--r--m4/biarch.m445
2 files changed, 49 insertions, 0 deletions
diff --git a/m4/ChangeLog b/m4/ChangeLog
index f82b0ca7..98de943b 100644
--- a/m4/ChangeLog
+++ b/m4/ChangeLog
@@ -1,3 +1,7 @@
12013-11-07 Jan Kratochvil <jan.kratochvil@redhat.com>
2
3 * biarch.m4: New file.
4
12013-04-24 Mark Wielaard <mjw@redhat.com> 52013-04-24 Mark Wielaard <mjw@redhat.com>
2 6
3 * gettext.m4: Upgrade to gettext-0.18.2. 7 * gettext.m4: Upgrade to gettext-0.18.2.
diff --git a/m4/biarch.m4 b/m4/biarch.m4
new file mode 100644
index 00000000..a15323e2
--- /dev/null
+++ b/m4/biarch.m4
@@ -0,0 +1,45 @@
1AC_DEFUN([utrace_CC_m32], [dnl
2AC_CACHE_CHECK([$CC option for 32-bit word size], utrace_cv_CC_m32, [dnl
3save_CC="$CC"
4utrace_cv_CC_m32=none
5for ut_try in -m32 -m31; do
6 [CC=`echo "$save_CC" | sed 's/ -m[36][241]//'`" $ut_try"]
7 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int foo (void) { return 1; }]])],
8 [utrace_cv_CC_m32=$ut_try])
9 test x$utrace_cv_CC_m32 = xnone || break
10done
11CC="$save_CC"])])
12
13AC_DEFUN([utrace_HOST64], [AC_REQUIRE([utrace_CC_m32])
14AS_IF([test x$utrace_cv_CC_m32 != xnone], [dnl
15AC_CACHE_CHECK([for 64-bit host], utrace_cv_host64, [dnl
16AC_EGREP_CPP([@utrace_host64@], [#include <stdint.h>
17#if (UINTPTR_MAX > 0xffffffffUL)
18@utrace_host64@
19#endif],
20 utrace_cv_host64=yes, utrace_cv_host64=no)])
21AS_IF([test $utrace_cv_host64 = no],
22 [utrace_biarch=-m64 utrace_thisarch=$utrace_cv_CC_m32],
23 [utrace_biarch=$utrace_cv_CC_m32 utrace_thisarch=-m64])
24
25biarch_CC=`echo "$CC" | sed "s/ *${utrace_thisarch}//"`
26biarch_CC="$biarch_CC $utrace_biarch"])])
27
28AC_DEFUN([utrace_BIARCH], [AC_REQUIRE([utrace_HOST64])
29utrace_biarch_forced=no
30AC_ARG_WITH([biarch],
31 AC_HELP_STRING([--with-biarch],
32 [enable biarch tests despite build problems]),
33 [AS_IF([test "x$with_biarch" != xno], [utrace_biarch_forced=yes])])
34AS_IF([test $utrace_biarch_forced = yes], [dnl
35utrace_cv_cc_biarch=yes
36AC_MSG_NOTICE([enabling biarch tests regardless using $biarch_CC])], [dnl
37AS_IF([test x$utrace_cv_CC_m32 != xnone], [dnl
38AC_CACHE_CHECK([whether $biarch_CC makes executables we can run],
39 utrace_cv_cc_biarch, [dnl
40save_CC="$CC"
41CC="$biarch_CC"
42AC_RUN_IFELSE([AC_LANG_PROGRAM([], [])],
43 utrace_cv_cc_biarch=yes, utrace_cv_cc_biarch=no)
44CC="$save_CC"])], [utrace_cv_cc_biarch=no])])
45AM_CONDITIONAL(BIARCH, [test $utrace_cv_cc_biarch = yes])])