patches/strace/4.5.15/190-undef-syscall.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Jul 17 22:43:07 2011 +0200 (2011-07-17)
changeset 2893 a8a65758664f
parent 746 b150d6f590fc
permissions -rw-r--r--
cc/gcc: do not use the core pass-2 to build the baremetal compiler

In case we build a baremetal compiler, use the standard passes:
- core_cc is used to build the C library;
- as such, it is meant to run on build, not host;
- the final compiler is meant to run on host;

As the current final compiler step can not build a baremetal compiler,
call the core backend from the final step.

NB: Currently, newlib is built during the start_files pass, so we have
to have a core compiler by then... Once we can build the baremetal
compiler from the final cc step, then we can move the newlib build to
the proper step, and then get rid of the core pass-1 static compiler...

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
yann@257
     1
diff -dur strace-4.5.15.orig/linux/syscallent.h strace-4.5.15/linux/syscallent.h
yann@257
     2
--- strace-4.5.15.orig/linux/syscallent.h	2006-10-16 03:17:52.000000000 +0200
yann@257
     3
+++ strace-4.5.15/linux/syscallent.h	2007-07-14 19:30:16.000000000 +0200
yann@270
     4
@@ -130,7 +130,11 @@
yann@257
     5
 	{ 2,	TF,	sys_statfs,		"statfs"	}, /* 99 */
yann@257
     6
 	{ 2,	TD,	sys_fstatfs,		"fstatfs"	}, /* 100 */
yann@257
     7
 	{ 3,	0,	sys_ioperm,		"ioperm"	}, /* 101 */
yann@257
     8
-	{ 2,	TD,	sys_socketcall,		"socketcall", SYS_socketcall }, /* 102 */
yann@270
     9
+	{ 2,	TD,	sys_socketcall,		"socketcall"
yann@257
    10
+#ifdef __NR_socketcall
yann@270
    11
+	    , SYS_socketcall
yann@257
    12
+#endif
yann@270
    13
+								}, /* 102 */
yann@257
    14
 	{ 3,	0,	sys_syslog,		"syslog"	}, /* 103 */
yann@257
    15
 	{ 3,	0,	sys_setitimer,		"setitimer"	}, /* 104 */
yann@257
    16
 	{ 2,	0,	sys_getitimer,		"getitimer"	}, /* 105 */
yann@270
    17
@@ -145,7 +149,11 @@
yann@257
    18
 	{ 4,	TP,	sys_wait4,		"wait4", SYS_wait4 }, /* 114 */
yann@257
    19
 	{ 1,	0,	sys_swapoff,		"swapoff"	}, /* 115 */
yann@257
    20
 	{ 1,	0,	sys_sysinfo,		"sysinfo"	}, /* 116 */
yann@257
    21
-	{ 6,	0,	sys_ipc,		"ipc", SYS_ipc }, /* 117 */
yann@270
    22
+	{ 6,	0,	sys_ipc,		"ipc"
yann@257
    23
+#ifdef __NR_ipc
yann@270
    24
+	    , SYS_ipc
yann@257
    25
+#endif
yann@270
    26
+								}, /* 117 */
yann@257
    27
 	{ 1,	TD,	sys_fsync,		"fsync"		}, /* 118 */
yann@257
    28
 	{ 1,	TS,	sys_sigreturn,		"sigreturn"	}, /* 119 */
yann@257
    29
 	{ 5,	TP,	sys_clone,		"clone", SYS_clone }, /* 120 */
yann@270
    30
@@ -282,7 +290,11 @@
yann@257
    31
 	{ 3,	0,	sys_io_cancel,		"io_cancel"	}, /* 249 */
yann@257
    32
 	{ 5,	0,	sys_fadvise64,		"fadvise64"	}, /* 250 */
yann@257
    33
 	{ 5,	0,	printargs,		"SYS_251"	}, /* 251 */
yann@257
    34
-	{ 1,	TP,	sys_exit,		"exit_group", __NR_exit_group }, /* 252 */
yann@257
    35
+	{ 1,	TP,	sys_exit,		"exit_group"
yann@257
    36
+#ifdef __NR_exit_group
yann@257
    37
+	    , __NR_exit_group
yann@257
    38
+#endif
yann@257
    39
+								}, /* 252 */
yann@257
    40
 	{ 4,	0,	printargs,		"lookup_dcookie"}, /* 253 */
yann@257
    41
 	{ 1,	0,	sys_epoll_create,	"epoll_create"	}, /* 254 */
yann@257
    42
 	{ 4,	TD,	sys_epoll_ctl,		"epoll_ctl"	}, /* 255 */
yann@257
    43
diff -dur strace-4.5.15.orig/syscall.c strace-4.5.15/syscall.c
yann@257
    44
--- strace-4.5.15.orig/syscall.c	2007-07-14 19:22:49.000000000 +0200
yann@257
    45
+++ strace-4.5.15/syscall.c	2007-07-14 19:30:16.000000000 +0200
yann@257
    46
@@ -2404,14 +2404,18 @@
yann@257
    47
 	switch (known_scno(tcp)) {
yann@257
    48
 #ifdef LINUX
yann@257
    49
 #if !defined (ALPHA) && !defined(SPARC) && !defined(SPARC64) && !defined(MIPS) && !defined(HPPA)
yann@257
    50
+#ifdef __NR_socketcall
yann@257
    51
 	case SYS_socketcall:
yann@257
    52
 		decode_subcall(tcp, SYS_socket_subcall,
yann@257
    53
 			SYS_socket_nsubcalls, deref_style);
yann@257
    54
 		break;
yann@257
    55
+#endif
yann@257
    56
+#ifdef __NR_ipc
yann@257
    57
 	case SYS_ipc:
yann@257
    58
 		decode_subcall(tcp, SYS_ipc_subcall,
yann@257
    59
 			SYS_ipc_nsubcalls, shift_style);
yann@257
    60
 		break;
yann@257
    61
+#endif
yann@257
    62
 #endif /* !ALPHA && !MIPS && !SPARC && !SPARC64 && !HPPA */
yann@257
    63
 #if defined (SPARC) || defined (SPARC64)
yann@257
    64
 	case SYS_socketcall: