summaryrefslogtreecommitdiff
path: root/recipes/uclibc/uclibc-0.9.28/thumb-sysnum-h.patch
diff options
context:
space:
mode:
authorDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
committerDenys Dmytriyenko <denis@denix.org>2009-03-17 14:32:59 -0400
commit709c4d66e0b107ca606941b988bad717c0b45d9b (patch)
tree37ee08b1eb308f3b2b6426d5793545c38396b838 /recipes/uclibc/uclibc-0.9.28/thumb-sysnum-h.patch
parentfa6cd5a3b993f16c27de4ff82b42684516d433ba (diff)
rename packages/ to recipes/ per earlier agreement
See links below for more details: http://thread.gmane.org/gmane.comp.handhelds.openembedded/21326 http://thread.gmane.org/gmane.comp.handhelds.openembedded/21816 Signed-off-by: Denys Dmytriyenko <denis@denix.org> Acked-by: Mike Westerhof <mwester@dls.net> Acked-by: Philip Balister <philip@balister.org> Acked-by: Khem Raj <raj.khem@gmail.com> Acked-by: Marcin Juszkiewicz <hrw@openembedded.org> Acked-by: Koen Kooi <koen@openembedded.org> Acked-by: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
Diffstat (limited to 'recipes/uclibc/uclibc-0.9.28/thumb-sysnum-h.patch')
-rw-r--r--recipes/uclibc/uclibc-0.9.28/thumb-sysnum-h.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/recipes/uclibc/uclibc-0.9.28/thumb-sysnum-h.patch b/recipes/uclibc/uclibc-0.9.28/thumb-sysnum-h.patch
new file mode 100644
index 0000000000..599691ecee
--- /dev/null
+++ b/recipes/uclibc/uclibc-0.9.28/thumb-sysnum-h.patch
@@ -0,0 +1,45 @@
+--- uClibc-0.9.28/extra/scripts/gen_bits_syscall_h.sh.orig 2005-09-18 02:20:04.441119651 -0700
++++ uClibc-0.9.28/extra/scripts/gen_bits_syscall_h.sh 2005-09-18 03:17:58.287715035 -0700
+@@ -11,6 +11,37 @@
+ UNISTD_H_PATH=$TOPDIR/include/asm/unistd.h
+ INCLUDE_OPTS="-I$TOPDIR/include"
+
++# This test is added to avoid mangling the (variable) syscall base value on
++# ARM
++if echo "#if defined __arm__ || defined __thumb__
++xyzzy
++#endif" | $CC -E $INCLUDE_OPTS - | grep xyzzy >/dev/null
++then
++ echo '/* WARNING!!! AUTO-GENERATED FILE!!! DO NOT EDIT!!! */
++#ifndef _BITS_SYSNUM_H
++#define _BITS_SYSNUM_H
++
++#ifndef _SYSCALL_H
++# error "Never use <bits/sysnum.h> directly; include <sys/syscall.h> instead."
++#endif'
++ # arm case, assume unistd.h conforms to the one in 2.6.x, if not
++ # go into a corner and sulk (fix this script) The sed rune below
++ # expects items of the form UCLIBC_foo at the start of the line
++ # for each syscall number, the arm syscalls all start with lower
++ # case alpha and the all-important __NR_SYSCALL_BASE does not...
++ sed -n -e '/__sys2/Q' -e '/^[ ]*#include/,${
++ s/^[ ]*#include.*$//
++ h
++ s/^[ ]*#define[ ]*__NR_\([a-z][A-Za-z0-9_]*\)[ ]*\(.*\)[ ]*$/#undef __NR_\1\
++#define SYS_\1 __NR_\1/p
++ g
++ p
++ }' $UNISTD_H_PATH
++ # i.e. this relies on the __sys2 definition coming after the last
++ # sys number define (and #include preceding all useful definitions)
++ echo '#endif'
++else
++# non-arm case
+ ( echo "#include \"$UNISTD_H_PATH\"" ;
+ $CC -E -dN $INCLUDE_OPTS $UNISTD_H_PATH | # needed to strip out any kernel-internal defines
+ sed -ne 's/^[ ]*#define[ ]*__NR_\([A-Za-z0-9_]*\).*/UCLIBC_\1 __NR_\1/gp'
+@@ -29,3 +60,4 @@
+ echo ;
+ echo "#endif" ;
+ )
++fi