blob: 52931b01c584f1dbdad3e2d29e2e2018ac43ccc5 [file] [log] [blame]
Denis Vlasenko7d219aa2006-10-05 10:17:08 +00001#!/bin/sh
2
3debug=false
4
Denis Vlasenko018e0852007-02-25 00:40:37 +00005try() {
Denis Vlasenko7d219aa2006-10-05 10:17:08 +00006 added="$1"
7 shift
8 $debug && echo "Trying: $* $added"
Denis Vlasenko84a9b872007-03-15 23:44:10 +00009 "$@" $added >busybox.map 2>busybox_ld.err \
Denis Vlasenko41e1dc32007-03-18 21:45:21 +000010 && { rm busybox_ld.err; exit 0; }
Denis Vlasenko7d219aa2006-10-05 10:17:08 +000011}
12
13try "" "$@"
14try "-lm" "$@"
15try "-lcrypt" "$@"
16try "-Wl,--start-group -lcrypt -lm -Wl,--end-group" "$@"
Denis Vlasenko84a9b872007-03-15 23:44:10 +000017# It failed. Let people see the error messages
18cat busybox_ld.err