Apply ld-as-needed.patch from Ubunto to enable --as-needed