This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] fix compilation for mips with glibc-20051121 try 2


Hi,

despite a wrap in the last mail I found another issue in latest glibc and mips:

cross compiling glibc-20051121 for mips I got:

mips-t2-linux-gnu-gcc ../sysdeps/unix/sysv/linux/fchownat.c -c -std=gnu99 
-DNDEBUG=1 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g      
-I../include -I. 
-I/mnt/space/src/t2-trunk/src.glibc.mips.20051127.115256.24971.haudraufinix/glibc-20051121/objdir/io 
-I.. -I../libio  
-I/mnt/space/src/t2-trunk/src.glibc.mips.20051127.115256.24971.haudraufinix/glibc-20051121/objdir 
-I../sysdeps/mips/elf -I../sysdeps/unix/sysv/linux/mips/mips32 
-I../linuxthreads/sysdeps/unix/sysv/linux/mips 
-I../sysdeps/unix/sysv/linux/mips -I../linuxthreads/sysdeps/unix/sysv/linux 
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread 
-I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common 
-I../sysdeps/unix/mman -I../sysdeps/unix/inet 
-I../linuxthreads/sysdeps/unix/sysv -I../sysdeps/unix/sysv 
-I../sysdeps/unix/mips/mips32 -I../sysdeps/unix/mips 
-I../linuxthreads/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix 
-I../sysdeps/mips/mips32 -I../sysdeps/mips -I../sysdeps/ieee754/flt-32 
-I../sysdeps/ieee754/dbl-64 -I../linuxthreads/sysdeps/mips 
-I../sysdeps/wordsize-32 -I../sysdeps/mips/fpu -I../sysdeps/ieee754 
-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc 
-isystem /mnt/space/src/t2-trunk/build/mips-2.2.0-alpha-mips-EB-r8000-cross-generic/TOOLCHAIN/tools.cross/crosscc/../lib/gcc/mips-t2-linux-gnu/4.0.2/include 
-isystem /mnt/space/src/t2-trunk/build/mips-2.2.0-alpha-mips-EB-r8000-cross-generic/usr/include 
-D_LIBC_REENTRANT -include ../include/libc-symbols.h  -DPIC     
-o /mnt/space/src/t2-trunk/src.glibc.mips.20051127.115256.24971.haudraufinix/glibc-20051121/objdir/io/fchownat.o 
-MD -MP 
-MF /mnt/space/src/t2-trunk/src.glibc.mips.20051127.115256.24971.haudraufinix/glibc-20051121/objdir/io/fchownat.o.dt 
-MT /mnt/space/src/t2-trunk/src.glibc.mips.20051127.115256.24971.haudraufinix/glibc-20051121/objdir/io/fchownat.o
../sysdeps/unix/sysv/linux/fchownat.c: In function 'fchownat':
../sysdeps/unix/sysv/linux/fchownat.c:56: warning: implicit declaration of 
function 'alloca'
../sysdeps/unix/sysv/linux/fchownat.c:56: warning: incompatible implicit 
declaration of built-in function 'alloca'
../sysdeps/unix/sysv/linux/fchownat.c:63: warning: implicit declaration of 
function 'INTERNAL_SYSCALL_DECL'
../sysdeps/unix/sysv/linux/fchownat.c:63: error: 'err' undeclared (first use 
in this function)
../sysdeps/unix/sysv/linux/fchownat.c:63: error: (Each undeclared identifier 
is reported only once
../sysdeps/unix/sysv/linux/fchownat.c:63: error: for each function it appears 
in.)
../sysdeps/unix/sysv/linux/fchownat.c:66: warning: implicit declaration of 
function 'INTERNAL_SYSCALL'
../sysdeps/unix/sysv/linux/fchownat.c:70: warning: implicit declaration of 
function 'INTERNAL_SYSCALL_ERROR_P'
../sysdeps/unix/sysv/linux/fchownat.c:72: warning: implicit declaration of 
function 'INTERNAL_SYSCALL_ERRNO'

The attached patch works around this. Most probably there is a more elegant 
way to fix this.


--- glibc/sysdeps/unix/sysv/linux/fchownat.c.vanilla	2005-11-27 12:30:44.000000000 +0100
+++ glibc/sysdeps/unix/sysv/linux/fchownat.c	2005-11-27 12:37:15.000000000 +0100
@@ -23,6 +23,8 @@
 #include <string.h>
 #include <unistd.h>
 #include <sys/types.h>
+#include <alloca.h>
+#include <sysdep.h>
 
 /* Change the owner and group of FILE.  */
 int


and later on MREMAP_FIXED was undefined:

--- glibc/sysdeps/unix/sysv/linux/mips/bits/mman.h.vanilla	2005-11-27 13:20:18.000000000 +0100
+++ glibc/sysdeps/unix/sysv/linux/mips/bits/mman.h	2005-11-27 13:23:09.000000000 +0100
@@ -89,4 +89,5 @@
 /* Flags for `mremap'.  */
 #ifdef __USE_GNU
 # define MREMAP_MAYMOVE	1
+# define MREMAP_FIXED	2
 #endif



Yours,

-- 
Renà Rebe - Rubensstr. 64 - 12157 Berlin (Europe / Germany)
            http://www.exactcode.de | http://www.t2-project.org
            +49 (0)30  255 897 45


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]