strace and uclinux-m68k
Philippe De Muyter
phdm at macqel.be
Tue Apr 1 07:49:16 UTC 2003
Hello,
I have managed to cross-compile strace-4.4.94 for uclinux-m68k.
Here is the procedure and the needed patches
Philippe
Philippe De Muyter phdm at macqel.be Tel +32 27029044
Macq Electronique SA rue de l'Aeronef 2 B-1140 Bruxelles Fax +32 27029077
export CC="m68k-elf-gcc -m5307 -msep-data"
export LDFLAGS="-Wl,-elf2flt"
../strace-4.4.94/configure --host m68k-linux
make
2003-04-01 Philippe De Muyter <phdm at macqel.be>
* sock.c, stream.c : Check #ifdef LINUX, not linux.
* file.c : Always provide sys_*attr, regardless of #ifdef XATTR_CREATE.
* strace.c : Use vfork, not fork (for uclinux's sake).
--- file.cbk 2003-01-09 07:53:22.000000000 +0100
+++ file.c 2003-04-01 12:07:48.000000000 +0200
@@ -2156,11 +2156,11 @@
#endif /* HAVE_SYS_ASYNCH_H */
-#ifdef XATTR_CREATE
-
struct xlat xattrflags[] = {
+#ifdef XATTR_CREATE
{ XATTR_CREATE, "XATTR_CREATE" },
{ XATTR_REPLACE, "XATTR_REPLACE" },
+#endif
{ 0, NULL }
};
@@ -2270,5 +2270,3 @@
}
return 0;
}
-
-#endif
--- sock.cbk 2002-05-01 18:39:22.000000000 +0200
+++ sock.c 2003-04-01 11:37:55.000000000 +0200
@@ -29,7 +29,7 @@
#include "defs.h"
-#ifdef linux
+#ifdef LINUX
#include <sys/socket.h>
#else
#include <sys/sockio.h>
--- strace.cbk 2003-02-20 03:56:29.000000000 +0100
+++ strace.c 2003-04-01 12:16:22.000000000 +0200
@@ -449,7 +449,7 @@
progname, filename);
exit(1);
}
- switch (pid = fork()) {
+ switch (pid = vfork()) {
case -1:
perror("strace: fork");
cleanup();
--- stream.cbk 2003-01-10 21:09:43.000000000 +0100
+++ stream.c 2003-04-01 12:13:05.000000000 +0200
@@ -50,7 +50,7 @@
#include <sys/tihdr.h>
#endif
-#if defined(HAVE_SYS_STREAM_H) || defined(linux) || defined(FREEBSD)
+#if defined(HAVE_SYS_STREAM_H) || defined(LINUX) || defined(FREEBSD)
#ifndef HAVE_STROPTS_H
#define RS_HIPRI 1
@@ -367,7 +367,7 @@
}
#endif
-#if !defined(linux) && !defined(FREEBSD)
+#if !defined(LINUX) && !defined(FREEBSD)
static struct xlat stream_flush_options[] = {
{ FLUSHR, "FLUSHR" },
@@ -1296,6 +1296,6 @@
}
}
-#endif /* !linux && !FREEBSD */
+#endif /* !LINUX && !FREEBSD */
-#endif /* HAVE_SYS_STREAM_H || linux || FREEBSD */
+#endif /* HAVE_SYS_STREAM_H || LINUX || FREEBSD */
More information about the Strace-devel
mailing list