3 #does remove some useless ELF sections
4 OPTIM
=-fno-stack-protector
-fno-asynchronous-unwind-tables
-fno-dwarf2-cfi-asm \
7 ARCH?
=$(shell uname
-m | sed
-e s
/i
.86/x86
/ -e s
/parisc64
/parisc
/ \
8 -e s
/sun4u
/sparc64
/ -e s
/arm.
*/arm
/ -e s
/sa110
/arm
/ -e s
/sh.
*/sh
/)
10 thread
:thread.c ..
/..
/..
/ulinux
/arch
11 cpp -Wall
-Wextra
-I..
/..
/.. thread.c
-o cpp_thread.c
12 gcc
-Wall
-Wextra
-std
=gnu99
$(OPTIM
) -c cpp_thread.c
-o thread.o
13 ld -O
-nostdlib
-Bstatic
--strip-all thread.o \
14 $$(gcc
-print-libgcc-file-name
) --output thread
17 ln
-s archs
/$(ARCH
) ..
/..
/..
/ulinux
/arch
20 -rm -f ..
/..
/..
/ulinux
/arch
21 -rm -f cpp_thread.c thread.s thread.o thread