--- ./gcc/config/sol2.h.orig 2016-05-08 21:13:10.810423614 +0200 +++ ./gcc/config/sol2.h 2016-05-08 21:16:55.681535743 +0200 @@ -195,8 +195,8 @@ "%{G:-G} \ %{YP,*} \ %{R*} \ - %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp%R/lib:%R/usr/lib} \ - %{!p:%{!pg:-Y P,%R/lib:%R/usr/lib}}}" + %{!YP,*:%{p|pg:-Y P,%R/usr/gcc/7/lib:%R/lib:%R/usr/lib -R %R/usr/gcc/7/lib -L %R/usr/gcc/7/lib} \ + %{!p:%{!pg:-Y P,%R/usr/gcc/7/lib:%R/lib:%R/usr/lib -R %R/usr/gcc/7/lib -L %R/usr/gcc/7/lib}}}" #undef LINK_ARCH32_SPEC #define LINK_ARCH32_SPEC LINK_ARCH32_SPEC_BASE @@ -208,8 +208,8 @@ "%{G:-G} \ %{YP,*} \ %{R*} \ - %{!YP,*:%{p|pg:-Y P,%R/usr/lib/libp/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "} \ - %{!p:%{!pg:-Y P,%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR "}}}" + %{!YP,*:%{p|pg:-Y P,%R/usr/gcc/7/lib/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR " -R %R/usr/gcc/7/lib/" ARCH64_SUBDIR " -L %R/usr/gcc/7/lib/" ARCH64_SUBDIR "} \ + %{!p:%{!pg:-Y P,%R/usr/gcc/7/lib/" ARCH64_SUBDIR ":%R/lib/" ARCH64_SUBDIR ":%R/usr/lib/" ARCH64_SUBDIR " -R %R/usr/gcc/7/lib/" ARCH64_SUBDIR " -L %R/usr/gcc/7/lib/" ARCH64_SUBDIR "}}}" #undef LINK_ARCH64_SPEC #ifndef USE_GLD