clarify the purpose of this project
[nyanglibc.git] / make / rt.sh
blob60c9b33b4c7b40570c1449f63f3316848b2a2384
1 printf "\
2 RT******************************************************************************\n"
3 fns_pie_shared="\
4 aio_cancel \
5 aio_error \
6 aio_fsync \
7 aio_misc \
8 aio_read \
9 aio_read64 \
10 aio_return \
11 aio_suspend \
12 aio_write \
13 aio_write64 \
14 lio_listio \
15 lio_listio64 \
16 aio_sigqueue \
17 aio_notify \
18 timer_create \
19 timer_delete \
20 timer_getoverr \
21 timer_gettime \
22 timer_settime \
23 shm_open \
24 shm_unlink \
25 mq_open \
26 mq_close \
27 mq_unlink \
28 mq_getattr \
30 mq_notify \
31 mq_send \
32 mq_receive \
33 mq_timedsend \
34 mq_timedreceive \
35 timer_routines \
36 librt-cancellation \
38 mq_setattr \
40 fns_pie="\
41 $fns_pie_shared \
43 fns_shared="\
44 $fns_pie_shared \
45 rt-unwind-resume \
47 mkdir -p $build_dir/rt
48 for fn in $fns_pie
50 printf "ASSEMBLING PIE $fn\n"
51 $as $src_dir/rt/$fn.s -o $build_dir/rt/$fn.o
52 done
53 for fn in $fns_shared
55 printf "ASSEMBLING SHARED $fn\n"
56 $as $src_dir/rt/$fn.shared.s -o $build_dir/rt/$fn.os
57 done
58 printf 'CREATING LIBRT.A\n'
59 cd $build_dir/rt
60 $ar cruv librt.a aio_cancel.o aio_error.o aio_fsync.o aio_misc.o aio_read.o aio_read64.o aio_return.o aio_suspend.o aio_write.o aio_write64.o lio_listio.o lio_listio64.o aio_sigqueue.o aio_notify.o timer_create.o timer_delete.o timer_getoverr.o timer_gettime.o timer_settime.o shm_open.o shm_unlink.o mq_open.o mq_close.o mq_unlink.o mq_getattr.o mq_setattr.o mq_notify.o mq_send.o mq_receive.o mq_timedsend.o mq_timedreceive.o timer_routines.o librt-cancellation.o
61 printf 'CREATING LIBRT_PIC.A\n'
62 $ar cruv librt_pic.a aio_cancel.os aio_error.os aio_fsync.os aio_misc.os aio_read.os aio_read64.os aio_return.os aio_suspend.os aio_write.os aio_write64.os lio_listio.os lio_listio64.os aio_sigqueue.os aio_notify.os timer_create.os timer_delete.os timer_getoverr.os timer_gettime.os timer_settime.os shm_open.os shm_unlink.os mq_open.os mq_close.os mq_unlink.os mq_getattr.os mq_setattr.os mq_notify.os mq_send.os mq_receive.os mq_timedsend.os mq_timedreceive.os timer_routines.os librt-cancellation.os rt-unwind-resume.os
63 printf 'CREATING LIBRT.SO.1\n'
64 # it is using libgcc crt{begin.end}S.o we did build for libpthread
65 $ld \
66 -s \
67 -shared \
68 -O1 \
69 -z defs \
70 --dynamic-linker=/lib64/ld-linux-x86-64.so.2 \
71 $build_dir/libgcc/libpthread/crtbeginS.o \
72 -L$build_dir/csu/ \
73 --version-script=$src_dir/librt.versions.map \
74 -soname=librt.so.1 \
75 -z combreloc \
76 -z relro \
77 --hash-style=both \
78 --enable-new-dtags \
79 -z nodelete \
80 -L$build_dir \
81 -L$build_dir/math \
82 -L$build_dir/elf \
83 -L$build_dir/dlfcn \
84 -L$build_dir/nss \
85 -L$build_dir/nis \
86 -L$build_dir/rt \
87 -L$build_dir/resolv \
88 -L$build_dir/mathvec \
89 -L$build_dir/support \
90 -L$build_dir/crypt \
91 -L$build_dir/nptl \
92 -rpath-link=$build_dir:$build_dir/math:$build_dir/elf:$build_dir/dlfcn:$build_dir/nss:$build_dir/nis:$build_dir/rt:$build_dir/resolv:$build_dir/mathvec:$build_dir/support:$build_dir/crypt:$build_dir/nptl \
93 -o $build_dir/rt/librt.so \
94 -T $src_dir/shlib.lds \
95 $build_dir/csu/abi-note.o \
96 --whole-archive \
97 $build_dir/rt/librt_pic.a \
98 --no-whole-archive \
99 $build_dir/nptl/libpthread.so \
100 --start-group \
101 $build_dir/libc.so \
102 $build_dir/libc_nonshared.a \
103 --as-needed \
104 $build_dir/elf/ld-linux-x86-64.so.2 \
105 --no-as-needed \
106 --end-group \
107 $build_dir/libgcc/libpthread/crtendS.o