[PATCH] [ARM-EABI] Fix for sysnum.h generation

Sergey Lapin slapinid at gmail.com
Tue Oct 3 12:41:51 UTC 2006


Hi, all!
During our investigations on problems with these kind of errors:

/scratchbox/compilers/gcc-4.1-uclibc-arm/bin/arm-none-linux-uclibcgnueabi-gcc
-c libc/sysdeps/linux/common/__socketcall.c -o
libc/sysdeps/linux/common/__socketcall.os -include
./include/libc-symbols.h -Wall -Wstrict-prototypes
-fno-strict-aliasing -mlittle-endian -mtune=xscale -march=armv5te
-Wa,-mcpu=xscale -fno-stack-protector -fno-builtin -nostdinc
-I./include -I. -fsigned-char -Os -funit-at-a-time
-fno-tree-loop-optimize -fno-tree-dominator-opts -fno-strength-reduce
-fstrict-aliasing
-I./libpthread/linuxthreads.old/sysdeps/unix/sysv/linux/arm
-I./libpthread/linuxthreads.old/sysdeps/arm
-I./libpthread/linuxthreads.old/sysdeps/unix/sysv/linux
-I./libpthread/linuxthreads.old/sysdeps/pthread
-I./libpthread/linuxthreads.old -I./libpthread -isystem
/home/scratchbox/compilers/gcc-4.1-uclibc-arm/bin/../lib/gcc/arm-none-linux-uclibcgnueabi/4.1.2/include
-DNDEBUG -fPIC
libc/sysdeps/linux/common/__socketcall.c: In function '__socketcall':
libc/sysdeps/linux/common/__socketcall.c:14: error: '__NR_socketcall'
undeclared (first use in this function)
libc/sysdeps/linux/common/__socketcall.c:14: error: (Each undeclared
identifier is reported only once
libc/sysdeps/linux/common/__socketcall.c:14: error: for each function
it appears in.)
make[2]: *** [libc/sysdeps/linux/common/__socketcall.os] Error 1

... we found that it is becaue of invalid include/bits/sysnum.h generation

The resulting file contained the following #defines like this:

#define __NR_socketcall __NR_socketcall

This is due to fact that these syscalls no longer exist with ARM-EABI
and they are naturally #undefined in kernel's include/asm-arm/unistd.h

/*
 * The following syscalls are obsolete and no longer available for EABI.
 */
#if defined(__ARM_EABI__) && !defined(__KERNEL__)
#undef __NR_time
#undef __NR_umount
#undef __NR_stime
#undef __NR_alarm
#undef __NR_utime
#undef __NR_getrlimit
#undef __NR_select
#undef __NR_readdir
#undef __NR_mmap
#undef __NR_socketcall
#undef __NR_syscall
#undef __NR_ipc
#endif

But this #undef's will never get to sysnum.h

So the attached patch fixes this problem. Please look, if it needs
some reworking.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uclibc-patch2
Type: application/octet-stream
Size: 1260 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/uclibc/attachments/20061003/441c2816/attachment-0002.obj 


More information about the uClibc mailing list