[PATCH v2] arm: add RESET_PID in the clone impl

Waldemar Brodkorb wbx at openadk.org
Thu Sep 11 09:37:47 UTC 2014


Hi Wang,

I have tested your patch for arm/armhf and NPTL. Works fine.
The getpid tests didn't fail anymore.

But when I am trying to compile linuxthreads instead of NPTL I get:
/adk/uclibc-arm-static/toolchain_qemu-arm_uclibc_arm_eabi/usr/bin/arm-openadk-linux-uclibceabi-gcc
-c libc/sysdeps/linux/arm/syscall-eabi.S -o
libc/sysdeps/linux/arm/syscall-eabi.os -Wall -Wstrict-prototypes
-Wstrict-aliasing -funsigned-char -fno-builtin -fno-asm -msoft-float
-mlittle-endian -fno-stack-protector -nostdinc -I./include
-I./include -include libc-symbols.h -I./libc/sysdeps/linux/arm
-I./libc/sysdeps/linux -I./ldso/ldso/arm -I./ldso/include -I. -Os
-funit-at-a-time -fmerge-all-constants -fstrict-aliasing
-fno-tree-loop-optimize -fno-tree-dominator-opts
-fno-strength-reduce -march=armv7-a -mtune=cortex-a9
-mfloat-abi=soft -fwrapv -fno-ident -fhonour-copts -Os -pipe -g3
-fomit-frame-pointer -fno-unwind-tables
-fno-asynchronous-unwind-tables -marm
-I./libpthread/linuxthreads/sysdeps/unix/sysv/linux/arm
-I./libpthread/linuxthreads/sysdeps/arm
-I./libpthread/linuxthreads/sysdeps/unix/sysv/linux
-I./libpthread/linuxthreads/sysdeps/pthread
-I./libpthread/linuxthreads -I./libpthread
-I./libc/sysdeps/linux/common -isystem
/adk/uclibc-arm-static/toolchain_qemu-arm_uclibc_arm_eabi/usr/lib/gcc/arm-openadk-linux-uclibceabi/4.8.3/include-fixed
-isystem
/adk/uclibc-arm-static/toolchain_qemu-arm_uclibc_arm_eabi/usr/lib/gcc/arm-openadk-linux-uclibceabi/4.8.3/include
-I/adk/uclibc-arm-static/target_qemu-arm_uclibc_arm_eabi/usr/include/
-DNDEBUG -fPIC -MT libc/sysdeps/linux/arm/syscall-eabi.os -MD -MP
-MF libc/sysdeps/linux/arm/.syscall-eabi.os.dep -D__ASSEMBLER__
-Wa,--noexecstack
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h: Assembler
messages:
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:35: Error: bad
instruction `extern __inline
__attribute__((__always_inline__))__attribute__((__gnu_inline__,__artificial__))long
int'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:36: Error: bad
instruction `testandset (int*spinlock)'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:37: Error: junk
at end of line, first unrecognized character is `{'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:38: Error: bad
instruction `register unsigned int movcc pc,lr'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:40: Error: bad
instruction `__asm__ __volatile__("swp %0, %1, [%2]"'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:41: Error: junk
at end of line, first unrecognized character is `:'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:41: Error:
garbage following instruction -- `b __syscall_error(PLT))'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:42: Error: junk
at end of line, first unrecognized character is `:'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:44: Error: bad
instruction `return movcc pc,lr'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:45: Error: junk
at end of line, first unrecognized character is `}'
./libpthread/linuxthreads/sysdeps/arm/pt-machine.h:51: Error: bad
instruction `register char*stack_pointer __asm__("sp")'
Makerules:366: recipe for target 'libc/sysdeps/linux/arm/clone.os'
failed

Any idea how to fix the bug without breaking linuxthreads?

best regards
 Waldemar


More information about the uClibc mailing list