Further (build ?): [parisc-linux] strace ??? - is there any ???
Richard Hirst
rhirst@linuxcare.com
Mon, 22 Jan 2001 22:45:03 +0000
On Mon, Jan 22, 2001 at 10:43:12PM +0100, Christoph Plattner wrote:
> Hallo Mr Hirst !
>
> Now I have following problem. What is the clean
> way to build such autoconfigured tool cross ?
HOSTCC=gcc CC=hppa-linux-gcc ./configure --target=hppa-linux --host=hppa-linux
make
worked for me, except for a problem with redefinition of struct dirent64.
I hacked that out of /opt/palinux/hppa-linux/include/linux/dirent.h to
temporarily get round it.
I havn't checked the binary works. You might have to remove a chunk
of code from strace/defs.h, depending on how new your glibc is. With
a new glibc you need to remove the following block:
/* Hack until I figure out why we don't call ptrace in glibc, rather
* than the system call direct.
*/
static inline long raw_ptrace(int req, pid_t pid, void *addr, long data)
{
long res, ret;
if (req > 0 && req < 4)
data = (long)&ret;
res = ptrace(req, pid, addr, data);
if (res >= 0 && req > 0 && req < 4) {
errno = 0;
return ret;
}
return res;
}
#define ptrace raw_ptrace
Richard