Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 1 | From cc97307e8e39a81999c6a365d057487a02e6128e Mon Sep 17 00:00:00 2001 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 2 | From: Andre McCurdy <armccurdy@gmail.com> |
| 3 | Date: Mon, 18 Jan 2016 11:00:00 -0800 |
| 4 | Subject: [PATCH] mpers.m4: more robust test for -m32/-mx32 compile support |
| 5 | |
| 6 | When using the default OE toolchain for x86-64, the basic checks for |
| 7 | -m32 and -mx32 compile support in mpers.m4 pass but later attempts to |
| 8 | actually use the toolchain with -m32 fail, e.g. |
| 9 | |
| 10 | | In file included from /home/andre/build/tmp/sysroots/qemux86-64/usr/include/sys/syscall.h:31:0, |
| 11 | | from ../strace-4.11/defs.h:55, |
| 12 | | from mpers-m32/kernel_dirent.c:32: |
| 13 | | /home/andre/build/tmp/sysroots/qemux86-64/usr/include/bits/syscall.h:41:29: fatal error: bits/syscall-32.h: No such file or directory |
| 14 | |
| 15 | Make the mpers.m4 tests more robust so that configure correctly |
| 16 | detects the limitations of the OE toolchain. |
| 17 | |
| 18 | Upstream-Status: Pending |
| 19 | |
| 20 | Signed-off-by: Andre McCurdy <armccurdy@gmail.com> |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 21 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 22 | --- |
| 23 | m4/mpers.m4 | 2 ++ |
| 24 | 1 file changed, 2 insertions(+) |
| 25 | |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 26 | diff --git a/m4/mpers.m4 b/m4/mpers.m4 |
| 27 | index 13725d7..d8578ea 100644 |
| 28 | --- a/m4/mpers.m4 |
| 29 | +++ b/m4/mpers.m4 |
| 30 | @@ -88,6 +88,7 @@ case "$arch" in |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 31 | CFLAGS="$CFLAGS MPERS_CFLAGS $IFLAG" |
| 32 | AC_CACHE_CHECK([for mpers_name personality compile support], [st_cv_cc], |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 33 | [AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdint.h> |
| 34 | + #include <sys/syscall.h> |
| 35 | int main(){return 0;}]])], |
| 36 | [st_cv_cc=yes], |
| 37 | [st_cv_cc=no])]) |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame^] | 38 | @@ -95,6 +96,7 @@ case "$arch" in |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 39 | AC_CACHE_CHECK([for mpers_name personality runtime support], |
| 40 | [st_cv_runtime], |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 41 | [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdint.h> |
| 42 | + #include <sys/syscall.h> |
| 43 | int main(){return 0;}]])], |
| 44 | [st_cv_runtime=yes], |
| 45 | [st_cv_runtime=no], |