This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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] glibc-ports-2.7 ARM DOCARGS assembler error patch


Hi everybody,
                      This is my first patch in glibc-ports i get the
following error when i compile my linux-2.6.23 kernel for ARM
architecture

       ) | arm-linux-gcc -c -I../include
-I/usr/arm/packages/toolchain/glibc-build-1/misc
-I/usr/arm/packages/toolchain/glibc-build-1 -I../ports/sysdeps/arm/elf
-I../ports/sysdeps/unix/sysv/linux/arm/nptl
-I../ports/sysdeps/unix/sysv/linux/arm
-I../ports/sysdeps/unix/sysv/linux -I../nptl/sysdeps/unix/sysv/linux
-I../nptl/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../ports/sysdeps/unix/sysv -I../nptl/sysdeps/unix/sysv
-I../sysdeps/unix/sysv -I../ports/sysdeps/unix/arm
-I../ports/sysdeps/unix -I../nptl/sysdeps/unix -I../sysdeps/unix
-I../sysdeps/posix -I../ports/sysdeps/arm/nptl -I../ports/sysdeps/arm
-I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32
-I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754
-I../sysdeps/generic/elf -I../sysdeps/generic -I../ports -I../nptl
-I.. -I../libio -I. -nostdinc -isystem
/usr/lib/gcc/arm-linux/4.2.2/include -isystem
/usr/arm-linux/usr/include -D_LIBC_REENTRANT -include
../include/libc-symbols.h -DASSEMBLER -x assembler-with-cpp -o
/usr/arm/packages/toolchain/glibc-build-1/misc/splice.o -
<stdin>: Assembler messages:
<stdin>:2: Error: bad instruction `docargs_6'
<stdin>:2: Error: bad instruction `undocargs_6'
make[2]: *** [/usr/arm/packages/toolchain/glibc-build-1/misc/splice.o] Error 1
make[2]: Leaving directory `/usr/arm/packages/toolchain/glibc-2.7/misc'
make[1]: *** [misc/subdir_lib] Error 2
make[1]: Leaving directory `/usr/arm/packages/toolchain/glibc-2.7'
make: *** [all] Error 2


I removed the references to docargs in
/glibc-ports-2.7/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h so
that solves the problem.

How ever i have not tested for larger impact of this removal of this
instruction ...

Logically since the ARM assembler does not recognize this instruction
i beleive there is no harm in removing any reference to this .

Regards
Deepak


-- 
Hack Hack Hack
diff -urN ./glibc-ports-2.7/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h ./glibc-ports-2.7/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h
--- ./glibc-ports-2.7/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h	2007-06-06 22:57:04.000000000 +0530
+++ ./glibc-ports-2.7/sysdeps/unix/sysv/linux/arm/nptl/sysdep-cancel.h	2008-02-19 20:15:07.000000000 +0530
@@ -43,36 +43,10 @@
     cmn r0, $4096;							\
     PSEUDO_RET;								\
   .Lpseudo_cancel:							\
-    DOCARGS_##args;	/* save syscall args etc. around CENABLE.  */	\
-    CENABLE;								\
-    mov ip, r0;		/* put mask in safe place.  */			\
-    UNDOCARGS_##args;	/* restore syscall args.  */			\
-    swi SYS_ify (syscall_name);	/* do the call.  */			\
-    str r0, [sp, $-4]!; /* save syscall return value.  */		\
-    mov r0, ip;		/* get mask back.  */				\
-    CDISABLE;								\
     ldmfd sp!, {r0, lr}; /* retrieve return value and address.  */	\
     UNDOARGS_##args;							\
     cmn r0, $4096;
 
-# define DOCARGS_0	str lr, [sp, #-4]!;
-# define UNDOCARGS_0
-
-# define DOCARGS_1	stmfd sp!, {r0, lr};
-# define UNDOCARGS_1	ldr r0, [sp], #4;
-
-# define DOCARGS_2	stmfd sp!, {r0, r1, lr};
-# define UNDOCARGS_2	ldmfd sp!, {r0, r1};
-
-# define DOCARGS_3	stmfd sp!, {r0, r1, r2, lr};
-# define UNDOCARGS_3	ldmfd sp!, {r0, r1, r2};
-
-# define DOCARGS_4	stmfd sp!, {r0, r1, r2, r3, lr};
-# define UNDOCARGS_4	ldmfd sp!, {r0, r1, r2, r3};
-
-# define DOCARGS_5	DOCARGS_4
-# define UNDOCARGS_5	UNDOCARGS_4
-
 # ifdef IS_IN_libpthread
 #  define CENABLE	bl PLTJMP(__pthread_enable_asynccancel)
 #  define CDISABLE	bl PLTJMP(__pthread_disable_asynccancel)

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