--- gcc-4.9.4.old/gcc/collect2.c +++ gcc-4.9.4/gcc/collect2.c @@ -1256,6 +1256,11 @@ AIX loader always searches for libraries. */ add_prefix (&libpath_lib_dirs, "/lib"); add_prefix (&libpath_lib_dirs, "/usr/lib"); + add_prefix (&libpath_lib_dirs, "__META_SYSTREE__/pkg/syslib/lib" ); + add_prefix (&libpath_lib_dirs, "__META_SYSTREE__/pkg/glibc/lib" ); + add_prefix (&libpath_lib_dirs, "__META_SYSTREE__/pkg/musl/lib" ); + add_prefix (&libpath_lib_dirs, "__META_SYSTREE__/pkg/toolchain/lib" ); + add_prefix (&libpath_lib_dirs, "__META_SYSTREE__/pkg/xorg/lib" ); #endif /* Get any options that the upper GCC wants to pass to the sub-GCC.