Make strace 4.5.17 and 4.5.18 build with latest uClibc (which no longer install cachectl.h).
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sun Nov 16 20:37:39 2008 +0000 (2008-11-16)
changeset 1045b665e9fb06f9
parent 1044 45d690b4e2c5
child 1046 f07b7b9619c6
Make strace 4.5.17 and 4.5.18 build with latest uClibc (which no longer install cachectl.h).
Patch from OpenEmbedded, by Khem (RAJ?), and forwarded by Joachim NILSSON.

/trunk/patches/strace/4.5.17/180-no_cachectl.patch | 35 35 0 0 ++++++++++++++++++++++++++++
/trunk/patches/strace/4.5.18/170-no_cachectl.patch | 35 35 0 0 ++++++++++++++++++++++++++++
2 files changed, 70 insertions(+)
patches/strace/4.5.17/180-no_cachectl.patch
patches/strace/4.5.18/170-no_cachectl.patch
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/patches/strace/4.5.17/180-no_cachectl.patch	Sun Nov 16 20:37:39 2008 +0000
     1.3 @@ -0,0 +1,35 @@
     1.4 +This patch is needed on newer uclibc becuase the uclibc header generation
     1.5 +mechanism generates the sysnum.h properly NR_cacheflush is defined for ARM
     1.6 +but there is no cachectl.h file which is exported to userspace. Strace 
     1.7 +assumes that if SYS_cacheflush is defined than it icludes asm/cachectl.h
     1.8 +which breaks the build for ARM now.
     1.9 +
    1.10 +This patch adds a check for ARM architecture.
    1.11 +
    1.12 +-Khem
    1.13 +
    1.14 +Here is error
    1.15 +
    1.16 +| if ccache arm-angstrom-linux-uclibcgnueabi-gcc -march=armv5te -mtune=arm926ej-s -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/arm -I./linux/arm -Ilinux -I./linux  -isystem/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/staging/arm-angstrom-linux-uclibcgnueabi/usr/include -Wall -isystem/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/staging/arm-angstrom-linux-uclibcgnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -MT term.o -MD -MP -MF ".deps/term.Tpo" -c -o term.o term.c; \
    1.17 +|   then mv -f ".deps/term.Tpo" ".deps/term.Po"; else rm -f ".deps/term.Tpo"; exit 1; fi
    1.18 +| system.c:69:26: error: asm/cachectl.h: No such file or directory
    1.19 +| make[1]: *** [system.o] Error 1
    1.20 +| make[1]: *** Waiting for unfinished jobs....
    1.21 +| signal.c: In function 'sys_sigreturn':
    1.22 +| signal.c:1221: warning: passing argument 4 of 'ptrace' makes integer from pointer without a cast
    1.23 +| make[1]: Leaving directory `/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/work/armv5te-angstrom-linux-uclibcgnueabi/strace-4.5.14-r5/strace-4.5.14'
    1.24 +| make: *** [all] Error 2
    1.25 +| FATAL: oe_runmake failed
    1.26 +
    1.27 +Index: strace-4.5.14/system.c
    1.28 +===================================================================
    1.29 +--- strace-4.5.14.orig/system.c 2008-05-15 20:23:16.000000000 -0700
    1.30 ++++ strace-4.5.14/system.c  2008-05-15 20:24:03.000000000 -0700
    1.31 +@@ -70,7 +70,7 @@
    1.32 + #include <linux/capability.h>
    1.33 + #endif
    1.34 + 
    1.35 +-#ifdef SYS_cacheflush
    1.36 ++#if defined SYS_cacheflush && !defined ARM
    1.37 + #include <asm/cachectl.h>
    1.38 + #endif
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/patches/strace/4.5.18/170-no_cachectl.patch	Sun Nov 16 20:37:39 2008 +0000
     2.3 @@ -0,0 +1,35 @@
     2.4 +This patch is needed on newer uclibc becuase the uclibc header generation
     2.5 +mechanism generates the sysnum.h properly NR_cacheflush is defined for ARM
     2.6 +but there is no cachectl.h file which is exported to userspace. Strace 
     2.7 +assumes that if SYS_cacheflush is defined than it icludes asm/cachectl.h
     2.8 +which breaks the build for ARM now.
     2.9 +
    2.10 +This patch adds a check for ARM architecture.
    2.11 +
    2.12 +-Khem
    2.13 +
    2.14 +Here is error
    2.15 +
    2.16 +| if ccache arm-angstrom-linux-uclibcgnueabi-gcc -march=armv5te -mtune=arm926ej-s -DHAVE_CONFIG_H -I. -I. -I. -Ilinux/arm -I./linux/arm -Ilinux -I./linux  -isystem/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/staging/arm-angstrom-linux-uclibcgnueabi/usr/include -Wall -isystem/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/staging/arm-angstrom-linux-uclibcgnueabi/usr/include -fexpensive-optimizations -fomit-frame-pointer -frename-registers -Os -MT term.o -MD -MP -MF ".deps/term.Tpo" -c -o term.o term.c; \
    2.17 +|   then mv -f ".deps/term.Tpo" ".deps/term.Po"; else rm -f ".deps/term.Tpo"; exit 1; fi
    2.18 +| system.c:69:26: error: asm/cachectl.h: No such file or directory
    2.19 +| make[1]: *** [system.o] Error 1
    2.20 +| make[1]: *** Waiting for unfinished jobs....
    2.21 +| signal.c: In function 'sys_sigreturn':
    2.22 +| signal.c:1221: warning: passing argument 4 of 'ptrace' makes integer from pointer without a cast
    2.23 +| make[1]: Leaving directory `/home/kraj/work/oe/build/uclibc/tmp-omap5912osk/work/armv5te-angstrom-linux-uclibcgnueabi/strace-4.5.14-r5/strace-4.5.14'
    2.24 +| make: *** [all] Error 2
    2.25 +| FATAL: oe_runmake failed
    2.26 +
    2.27 +Index: strace-4.5.14/system.c
    2.28 +===================================================================
    2.29 +--- strace-4.5.14.orig/system.c 2008-05-15 20:23:16.000000000 -0700
    2.30 ++++ strace-4.5.14/system.c  2008-05-15 20:24:03.000000000 -0700
    2.31 +@@ -65,7 +65,7 @@
    2.32 + #include <linux/capability.h>
    2.33 + #endif
    2.34 + 
    2.35 +-#ifdef SYS_cacheflush
    2.36 ++#if defined SYS_cacheflush && !defined ARM
    2.37 + #include <asm/cachectl.h>
    2.38 + #endif