summaryrefslogtreecommitdiffstats
path: root/poky/meta/recipes-devtools/strace/strace/more-robust-test-for-m32-mx32-compile-support.patch
blob: 3d4913d68e0daa271d712ea4395f9354ff6af6d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From 154af50ed7ed8b91838d713052ebf29b0b14f765 Mon Sep 17 00:00:00 2001
From: Andre McCurdy <armccurdy@gmail.com>
Date: Mon, 18 Jan 2016 11:00:00 -0800
Subject: [PATCH] mpers.m4: more robust test for -m32/-mx32 compile support

When using the default OE toolchain for x86-64, the basic checks for
-m32 and -mx32 compile support in mpers.m4 pass but later attempts to
actually use the toolchain with -m32 fail, e.g.

 | In file included from /home/andre/build/tmp/sysroots/qemux86-64/usr/include/sys/syscall.h:31:0,
 |                  from ../strace-4.11/defs.h:55,
 |                  from mpers-m32/kernel_dirent.c:32:
 | /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

Make the mpers.m4 tests more robust so that configure correctly
detects the limitations of the OE toolchain.

Upstream-Status: Pending

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
---
 m4/mpers.m4 | 2 ++
 1 file changed, 2 insertions(+)

Index: strace-4.22/m4/mpers.m4
===================================================================
--- strace-4.22.orig/m4/mpers.m4
+++ strace-4.22/m4/mpers.m4
@@ -108,6 +108,7 @@ case "$arch" in
 	CFLAGS="$CFLAGS MPERS_CFLAGS $IFLAG"
 	AC_CACHE_CHECK([for mpers_name personality compile support], [st_cv_cc],
 		[AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
+						     #include <sys/syscall.h>
 						     int main(){return 0;}]])],
 				   [st_cv_cc=yes],
 				   [st_cv_cc=no])])
@@ -115,6 +116,7 @@ case "$arch" in
 		AC_CACHE_CHECK([for mpers_name personality runtime support],
 			[st_cv_runtime],
 			[AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <stdint.h>
+							 #include <sys/syscall.h>
 							 int main(){return 0;}]])],
 				       [st_cv_runtime=yes],
 				       [st_cv_runtime=no],
OpenPOWER on IntegriCloud