clarify the purpose of this project
[nyanglibc.git] / make / login-libutil.sh
blob02e17ce8c6dc5f4505222df58e416444f785d2a6
1 printf "\
2 LOGIN LIBUTIL*******************************************************************\n"
3 mkdir -p $build_dir/login/libutil
4 fns_pie_shared="\
5 login \
6 login_tty \
7 logout \
8 logwtmp \
9 openpty \
10 forkpty \
12 fns_pie="\
13 $fns_pie_shared \
15 fns_shared="\
16 $fns_pie_shared \
18 for fn in $fns_pie
20 printf "ASSEMBLING PIE $fn\n"
21 $as $src_dir/login/libutil/$fn.s -o $build_dir/login/libutil/$fn.o
22 done
23 for fn in $fns_shared
25 printf "ASSEMBLING SHARED $fn\n"
26 $as $src_dir/login/libutil/$fn.shared.s -o $build_dir/login/libutil/$fn.os
27 done
28 printf 'CREATING LIBUTIL.A\n'
29 cd $build_dir/login/libutil
30 $ar cruv libutil.a login.o login_tty.o logout.o logwtmp.o openpty.o forkpty.o
31 printf 'CREATING LIBUTIL_PIC.A\n'
32 $ar cruv libutil_pic.a login.os login_tty.os logout.os logwtmp.os openpty.os forkpty.os
33 printf 'CREATING LIBUTIL.SO.1\n'
34 $ld \
35 -s \
36 -shared \
37 -O1 \
38 -z defs \
39 --dynamic-linker=/lib64/ld-linux-x86-64.so.2 \
40 -L$build_dir/csu/ \
41 --version-script=$src_dir/libutil.versions.map \
42 -soname=libutil.so.1 \
43 -z combreloc \
44 -z relro \
45 --hash-style=both \
46 -L$build_dir \
47 -L$build_dir/math \
48 -L$build_dir/elf \
49 -L$build_dir/dlfcn \
50 -L$build_dir/nss \
51 -L$build_dir/nis \
52 -L$build_dir/rt \
53 -L$build_dir/resolv \
54 -L$build_dir/mathvec \
55 -L$build_dir/support \
56 -L$build_dir/crypt \
57 -L$build_dir/nptl \
58 -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 \
59 -o $build_dir/login/libutil/libutil.so \
60 -T $src_dir/shlib.lds \
61 $build_dir/csu/abi-note.o \
62 --whole-archive \
63 $build_dir/login/libutil/libutil_pic.a \
64 --no-whole-archive \
65 --start-group \
66 $build_dir/libc.so \
67 $build_dir/libc_nonshared.a \
68 --as-needed \
69 $build_dir/elf/ld-linux-x86-64.so.2 \
70 --no-as-needed \
71 --end-group