Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | debug=false |
| 4 | |
Denis Vlasenko | 018e085 | 2007-02-25 00:40:37 +0000 | [diff] [blame] | 5 | try() { |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 6 | added="$1" |
| 7 | shift |
| 8 | $debug && echo "Trying: $* $added" |
Denis Vlasenko | 84a9b87 | 2007-03-15 23:44:10 +0000 | [diff] [blame] | 9 | "$@" $added >busybox.map 2>busybox_ld.err \ |
Denis Vlasenko | 41e1dc3 | 2007-03-18 21:45:21 +0000 | [diff] [blame] | 10 | && { rm busybox_ld.err; exit 0; } |
Denis Vlasenko | 7d219aa | 2006-10-05 10:17:08 +0000 | [diff] [blame] | 11 | } |
| 12 | |
| 13 | try "" "$@" |
| 14 | try "-lm" "$@" |
| 15 | try "-lcrypt" "$@" |
| 16 | try "-Wl,--start-group -lcrypt -lm -Wl,--end-group" "$@" |
Denis Vlasenko | 84a9b87 | 2007-03-15 23:44:10 +0000 | [diff] [blame] | 17 | # It failed. Let people see the error messages |
| 18 | cat busybox_ld.err |