Index: scripts/trylink =================================================================== --- scripts/trylink (revision 18750) +++ scripts/trylink (working copy) @@ -10,9 +10,24 @@ && { rm busybox_ld.err; exit 0; } } +libs="-lm -lcrypt -lsepol" try "" "$@" -try "-lm" "$@" -try "-lcrypt" "$@" -try "-Wl,--start-group -lcrypt -lm -Wl,--end-group" "$@" +for l in $libs +do + try "$l" "$@" +done +for l1 in $libs +do + for l2 in $libs + do + if [ $l1 = $l2 ] + then + continue + fi + try "-Wl,--start-group $l1 $l2,--end-group" "$@" + done +done + +try "-Wl,--start-group $libs,--end-group" "$@" # It failed. Let people see the error messages cat busybox_ld.err Index: Makefile.flags =================================================================== --- Makefile.flags (revision 18750) +++ Makefile.flags (working copy) @@ -56,7 +56,7 @@ endif ifeq ($(CONFIG_SELINUX),y) -LDLIBS += -lselinux -lsepol +LDLIBS += -lselinux endif ifeq ($(CONFIG_EFENCE),y)