MIPS64 build questions
Bernhard Reutner-Fischer
rep.dot.nop at gmail.com
Fri Jan 24 22:36:27 UTC 2014
On Fri, Jan 24, 2014 at 10:45:24AM -0800, Steve Ellcey wrote:
>On Fri, 2014-01-24 at 12:27 +0100, Waldemar Brodkorb wrote:
>> Hi Steve,
>> Steve Ellcey wrote,
>> >
>> > For MIPS64 and the N32 ABI my build dies with:
>> >
>> > libc/sysdeps/linux/mips/pread_write.c:23:32: error: '__NR_pwrite' undeclared (first use in this function)
>> > # define __NR___syscall_pwrite __NR_pwrite
>> > ^
>> > /local/home/sellcey/gcc/uclibc/obj-mips-mti-linux-uclibc/uclibc/obj_mips64/include/bits/syscalls.h:157:4: note: in definition of macro 'internal_syscall4'
>> > : input, "r" (__a0), "r" (__a1), "r" (__a2) \
>> > ^
>> > /local/home/sellcey/gcc/uclibc/obj-mips-mti-linux-uclibc/uclibc/obj_mips64/include/bits/syscalls-common.h:15:33: note: in expansion of macro '__NR___syscall_pwrite'
>> > # define SYS_ify(syscall_name) (__NR_##syscall_name)
>>
>> Same here. I just changed __NR_pwrite/__NR_pread to
>> __NR_pread64/__NR_pwrite64 to get beyond this. I already sent an
>> email to the list last year:
>> http://lists.uclibc.org/pipermail/uclibc/2013-November/048100.html
>>
>> Bernhard told me in a private mail he wants to verify this, but he
>> didn't get back to me since then.
>
>Yes, that change fixed things for me too.
Very sorry for that, i am swamped at work.
Does that patch work for you, both for LFS and !LFS?
>
>
>> > On MIPS64 with the N64 ABI it dies with:
>> >
>> > /local/home/sellcey/gcc/uclibc/obj-mips-mti-linux-uclibc/uclibc/obj_mips64_64/libc/libc_so.a(lockf64.os): In function `lockf64':
>> > lockf64.c:(.text+0x88): undefined reference to `fcntl64'
>> > collect2: error: ld returned 1 exit status
>> > make: *** [/local/home/sellcey/gcc/uclibc/obj-mips-mti-linux-uclibc/uclibc/obj_mips64_64/lib/libc.so] Error 1
>>
>> I do not see this second error in my build. Just verified a few
>> minutes ago with latest uclibc git master. How does your
>> configuration looks like? Mine is here:
>> http://www.openadk.org/uclibc-mips64.config
>
>I don't see any significant differences in our config files. It looks
>like the problem is that when lockf64 is being compiled for the N64 ABI
>it tries to call fcntl64 and there is no fcntl64 in the libc.a being
>built. Does your library have fcntl64? If not, does it have lockf64?
>I can workaround it by having lockf64 call fcntl instead of fcntl64
>(should be the same thing in LP64 mode) but I am not sure if that is the
>right fix or not.
It has to work for both !LFS as well as LFS, with no relocations.
thanks,
More information about the uClibc
mailing list