Problems with syscall for SH
Carmelo Amoroso
carmelo73 at gmail.com
Sat Mar 8 17:01:00 UTC 2008
Thiago Galesi wrote:
> Hello
>
> There you go
>
> CC libc/sysdeps/linux/sh/syscall.os
> libc/sysdeps/linux/sh/syscall.c:11: error: conflicting types for 'syscall'
> ./include/unistd.h:1016: error: previous declaration of 'syscall' was here
> libc/sysdeps/linux/sh/syscall.c:11: error: conflicting types for 'syscall'
> ./include/unistd.h:1016: error: previous declaration of 'syscall' was here
>
> Thanks
>
> Thiago Galesi
>
Hello Thiago,
I don't have any problem compiling this (using trunk r21275).
Follows a log for my build
....................
ads.old/sysdeps/pthread -I./libpthread/linuxthreads.old -I./libpthread
-I/Users/carmelo/work/buildroot/toolchain_build_sh4/linux/include/ -iwith prefix include-fixed -iwithprefix
include -fPIC
360 sh4-linux-uclibc-gcc -c libc/sysdeps/linux/sh/syscall.c -o libc/sysdeps/linux/sh/syscall.os -include
./include/libc-symbols.h -Wall -Wstrict-pro totypes -fno-strict-aliasing -Wnested-externs -Wshadow
-Wmissing-noreturn -Wmissing-format-attribute -Wformat=2 -Wmissing-prototypes -Wmissing-d eclarations -Wnonnull
-Wundef -ml -m4 -fno-stack-protector -fno-builtin -nostdinc -I./include -I. -I./libc/sysdeps/linux/sh -std=gnu99 -Os
-funi t-at-a-time -fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce -fstrict-aliasing
-mprefergot -I./libpthread/linuxthreads.old/ sysdeps/unix/sysv/linux/sh
-I./libpthread/linuxthreads.old/sysdeps/sh -I./libpthread/linuxthreads.old/sysdeps/unix/sysv/linux -I./libpthread/lin
uxthreads.old/sysdeps/pthread -I./libpthread/linuxthreads.old -I./libpthread
-I/Users/carmelo/work/buildroot/toolchain_build_sh4/linux/include/ -iwithprefix include-fixed -iwithprefix
include -fPIC
361 sh4-linux-uclibc-gcc -c libc/sysdeps/linux/sh/pread_write.c -o libc/sysdeps/linux/sh/pread_write.os -include
./include/libc-symbols.h -Wall -Wst rict-prototypes -fno-strict-aliasing -Wnested-externs -Wshadow
-Wmissing-noreturn -Wmissing-format-attribute -Wformat=2 -Wmissing-prototypes -Wm issing-declarations -Wnonnull
-Wundef -ml -m4 -fno-
..............................
sh4-linux-uclibc-gcc --version
sh4-linux-uclibc-gcc (GCC) 4.2.1
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
What version of gcc are you using ? and waht is your full command line ?
Carmelo
> On Thu, Mar 6, 2008 at 4:00 PM, Carmelo AMOROSO <carmelo.amoroso at st.com> wrote:
>> Thiago Galesi wrote:
>> > Hello
>> >
>> > It is not a problem compiling an application that uses syscall, but
>> > rather, building uclibc (using buildroot.uclibc as part of toolchain
>> > build).
>> >
>> > Yours
>> >
>> > Thiago Galesi
>> >
>> ??? I'm a bit confused. I don't have any problems to build uClibc,
>> neither almost 500 packages
>> against uclibc. I don't use buildroot anyway.
>> Please, post some logs if available.
>>
>> Carmelo
>>
>>
>>> On Thu, Mar 6, 2008 at 2:37 PM, Carmelo AMOROSO <carmelo.amoroso at st.com> wrote:
>> >
>> >> Carmelo Amoroso wrote:
>> >> > Thiago Galesi wrote:
>> >> >
>> >> >> Hello
>> >> >>
>> >> >> I am trying this with svn uclibc, and even with (moderately) old
>> >> >> versions the result is the same.
>> >> >>
>> >> >> I saw this problem discussed in older messages (for other archs), but
>> >> >> it was not solved them
>> >> >>
>> >> >> There is a conflict with the definition of syscall (in .h) and the
>> >> >> implementation (for SH).
>> >> >>
>> >> >> this is the .h (include/unistd.h)
>> >> >>
>> >> >> extern long int syscall (long int __sysno, ...) __THROW;
>> >> >>
>> >> >> this is the .c (libc/sysdeps/linux/sh/syscall.c)
>> >> >>
>> >> >> long syscall(long sysnum,
>> >> >> long arg1, long arg2, long arg3,
>> >> >> long arg4, long arg5, long arg6)
>> >> >>
>> >> >> Problem is, if I take the .c prototype and put it in the .h, things
>> >> >> will not work (eg. there are problems with compiling pthread)
>> >> >>
>> >> >> What would be the correct way to deal with this? Most archs don't have
>> >> >> this problem, as they have a syscall.S file, ARM uses a .c, I'll try
>> >> >> to figure out from there.
>> >> >>
>> >> >> Thanks
>> >> >>
>> >> >
>> >> > Hello Thiago,
>> >> > I cannot do any test just now, hopefully tomorrow
>> >> > I will do a check on my sh4.
>> >> >
>> >> > Carmelo
>> >> >
>> >> Hello,
>> >> I did a simple test call syscall(100, 1, 2,3,4) and I did not get any
>> >> problem at compile
>> >> time.. where is the conflict you have ? can you post some error messages ?
>> >>
>> >> Carmelo
>> >> > _______________________________________________
>> >> > uClibc mailing list
>> >> > uClibc at uclibc.org
>> >> > http://busybox.net/cgi-bin/mailman/listinfo/uclibc
>> >> >
>> >> >
>> >>
>> >>
>> >>
>> >
>> >
>> >
>> >
>>
>>
>
>
>
More information about the uClibc
mailing list