Problems with MIPS cross compiling for GCC-4.1.0...

Dan Kegel dank@kegel.com
Tue Apr 19 06:16:00 GMT 2005


Steven J. Hill wrote:
> While I am getting closer to full toolchain build, GCC-4.1.0 is still
> not behaving the way it should. Below is the output that I am running
> up against. I attempted to define a stack variable to hold the value
> of zero and tried using that instead of the actual value, but nothing
> worked. I had a similar problem with 'do_waitid' and I have attached
> the patch just for the sake of discussion. Does anyone have some
> insight on this? I am using binutils-2.15, glibc-2.3.4, 2.6.12-rc2
> kernel headers and gcc-4.1.0-20050418. Thanks.
> 
> 
> ../sysdeps/unix/sysv/linux/waitid.c: In function 'do_waitid':
> ../sysdeps/unix/sysv/linux/waitid.c:52: error: memory input 6 is not directly addressable
> ../sysdeps/unix/sysv/linux/waitid.c:55: error: memory input 6 is not directly addressable
> 
> diff -ur glibc-2.3.4/sysdeps/unix/sysv/linux/waitid.c glibc-2.3.4-patched/sysdeps/unix/sysv/linux/waitid.c
> --- glibc-2.3.4/sysdeps/unix/sysv/linux/waitid.c	2004-10-30 13:01:02.000000000 -0500
> +++ glibc-2.3.4-patched/sysdeps/unix/sysv/linux/waitid.c	2005-04-18 19:01:28.334689002 -0500
> @@ -47,12 +47,14 @@
>  do_waitid (idtype_t idtype, id_t id, siginfo_t *infop, int options)
>  {
>    static int waitid_works;
> +  struct rusage *sim = NULL;
> +
>    if (waitid_works > 0)
> -    return INLINE_SYSCALL (waitid, 5, idtype, id, infop, options, NULL);
> +    return INLINE_SYSCALL (waitid, 5, idtype, id, infop, options, sim);
>    if (waitid_works == 0)
>      {
>        int result = INLINE_SYSCALL (waitid, 5,
> -				   idtype, id, infop, options, NULL);
> +				   idtype, id, infop, options, sim);

Perhaps INLINE_SYSCALL needs some work to be gcc-4 compatible?
(tap tap tap)
Yep.  Check out the recent changes in
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h?cvsroot=glibc
I bet applying
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h.diff?r1=1.2&r2=1.3&cvsroot=glibc
and maybe the next one
http://sourceware.org/cgi-bin/cvsweb.cgi/libc/sysdeps/unix/sysv/linux/mips/mips32/sysdep.h.diff?r1=1.3&r2=1.4&cvsroot=glibc
will cure what ails ye.
- Dan

-- 
Trying to get a job as a c++ developer?  See http://kegel.com/academy/getting-hired.html



More information about the Gcc mailing list