ld.musl-clang.in\tools - musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/tools/ld.musl-clang.in
blob: 93763d6b2cff585323477b30193cb933e0101623 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/sh
cc="@CC@"
libc_lib="@LIBDIR@"
ldso="@LDSO@"
cleared=
shared=
userlinkdir=
userlink=
for x ; do
 test "$cleared" || set -- ; cleared=1
 case "$x" in
 -L-user-start)
 userlinkdir=1
 ;;
 -L-user-end)
 userlinkdir=
 ;;
 -L*)
 test "$userlinkdir" && set -- "$@" "$x"
 ;;
 -l-user-start)
 userlink=1
 ;;
 -l-user-end)
 userlink=
 ;;
 crtbegin*.o|crtend*.o)
 set -- "$@" $($cc -print-file-name=$x)
 ;;
 -lgcc|-lgcc_eh)
 file=lib${x#-l}.a
 set -- "$@" $($cc -print-file-name=$file)
 ;;
 -l*)
 test "$userlink" && set -- "$@" "$x"
 ;;
 -shared)
 shared=1
 set -- "$@" -shared
 ;;
 -sysroot=*|--sysroot=*)
 ;;
 *)
 set -- "$@" "$x"
 ;;
 esac
done
exec $($cc -print-prog-name=ld) -nostdlib "$@" -lc -dynamic-linker "$ldso"
generated by cgit v1.2.1 (git 2.18.0) at 2025年09月08日 05:45:58 +0000

AltStyle によって変換されたページ (->オリジナル) /