the change in asm/ptrace.h on powerpc:
--- ../ptrace.h 2010-05-21 10:16:55.000000000 +0000
+++ ../../ptrace.h 2010-05-21 10:18:45.000000000 +0000
@@ -24,6 +24,8 @@
* 2 of the License, or (at your option) any later version.
*/
+#include <stdint.h>
+
#ifndef __ASSEMBLY__
struct pt_regs {
(compared to lucid) breaks the build on powerpc:
gcc-4.4 -fno-stack-protector -U_FORTIFY_SOURCE ../sysdeps/unix/sysv/linux/powerpc/powerpc32/getcontext.S -c -I../include -I/build/buildd/eglibc-2.12~20100519/build-tree/powerpc-libc/stdlib -I/build/buildd/eglibc-2.12~20100519/build-tree/powerpc-libc -I../sysdeps/powerpc/powerpc32/elf -I../sysdeps/powerpc/elf -I../sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu -I../sysdeps/powerpc/powerpc32/fpu -I../nptl/sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../sysdeps/unix/sysv/linux/powerpc/powerpc32 -I../nptl/sysdeps/unix/sysv/linux/powerpc -I../sysdeps/unix/sysv/linux/powerpc -I../sysdeps/ieee754/ldbl-128ibm -I../sysdeps/ieee754/ldbl-opt -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../nptl/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../sysdeps/unix/powerpc -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/powerpc/powerpc32 -I../sysdeps/wordsize-32 -I../sysdeps/powerpc/fpu -I../nptl/sysdeps/powerpc -I../sysdeps/powerpc -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/powerpc-linux-gnu/4.4.4/include -isystem /usr/lib/gcc/powerpc-linux-gnu/4.4.4/include-fixed -isystem /build/buildd/eglibc-2.12~20100519/debian/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DASSEMBLER -pipe -O2 -fstrict-aliasing -g -Wa,--noexecstack -o /build/buildd/eglibc-2.12~20100519/build-tree/powerpc-libc/stdlib/getcontext.o -MD -MP -MF /build/buildd/eglibc-2.12~20100519/build-tree/powerpc-libc/stdlib/getcontext.o.dt -MT /build/buildd/eglibc-2.12~20100519/build-tree/powerpc-libc/stdlib/getcontext.o
../sysdeps/generic/stdint.h: Assembler messages:
../sysdeps/generic/stdint.h:37: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:38: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:39: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:43: Error: Unrecognized opcode: `__extension__'
../sysdeps/generic/stdint.h:44: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:49: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:50: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:52: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:58: Error: Unrecognized opcode: `__extension__'
../sysdeps/generic/stdint.h:59: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:66: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:67: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:68: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:72: Error: Unrecognized opcode: `__extension__'
../sysdeps/generic/stdint.h:73: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:77: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:78: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:79: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:83: Error: Unrecognized opcode: `__extension__'
../sysdeps/generic/stdint.h:84: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:91: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:97: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:98: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:99: Error: Unrecognized opcode: `__extension__'
../sysdeps/generic/stdint.h:100: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:104: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:110: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:111: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:112: Error: Unrecognized opcode: `__extension__'
../sysdeps/generic/stdint.h:113: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:126: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:129: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:138: Error: Unrecognized opcode: `__extension__'
../sysdeps/generic/stdint.h:139: Error: Unrecognized opcode: `typedef'
../sysdeps/generic/stdint.h:140: Error: Unrecognized opcode: `__extension__'
../sysdeps/generic/stdint.h:141: Error: Unrecognized opcode: `typedef'
make[3]: *** [/build/buildd/eglibc-2.12~20100519/build-tree/powerpc-libc/stdlib/getcontext.o] Error 1
shouldn't the #include go inside the #ifndef __ASSEMBLY__ ?
The headers reported here are the post-munging headers as exposed in linux-libc-dev. As a result they differ from the upstream commits. This include was introduced by the commit below:
commit 3162d92dfb79a0b 5fc03380b8819fa 5f870ebf1e
Author: Dave Kleikamp <email address hidden>
Date: Mon Feb 8 11:51:05 2010 +0000
powerpc: Extended ptrace interface
Which introduced this fragment:
+#ifdef __KERNEL__
+#include <linux/types.h>
+#else
+#include <stdint.h>
+#endif
+
#ifndef __ASSEMBLY__
Now for the kernel this is fine as the linux/types.h is asm protected also. For userspace not so much. Looking over all of the consumers of the types which are added they are all __ASSEMBLY__ protected, so it seems entirly reasonable to move this whole assemblage into the #ifndef __ASSEMBLY__ section.