--- ./gcc/config/rs6000/aix61.h_orig	2020-12-06 03:34:20.000000000 -0600
+++ ./gcc/config/rs6000/aix61.h	2020-12-06 03:35:02.000000000 -0600
@@ -154,7 +154,7 @@
    %{!maix64:%{!shared:%{g*:-lg}}}\
    %{fprofile-arcs|fprofile-generate*|coverage:-lpthreads}\
    %{mpe:-L%R/usr/lpp/ppe.poe/lib -lmpi -lvtd}\
-   %{pthread:-lpthreads} -lc"
+   %{pthread:-lpthreads} -lc -L/opt/freeware/lib"
 
 #undef LINK_SPEC
 #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro}\
--- ./gcc/config/rs6000/aix71.h_orig	2020-12-06 03:35:10.000000000 -0600
+++ ./gcc/config/rs6000/aix71.h	2020-12-06 03:35:31.000000000 -0600
@@ -155,7 +155,7 @@
    %{!maix64:%{!shared:%{g*:-lg}}}\
    %{fprofile-arcs|fprofile-generate*|coverage:-lpthreads}\
    %{mpe:-L%R/usr/lpp/ppe.poe/lib -lmpi -lvtd}\
-   %{pthread:-lpthreads} -lc"
+   %{pthread:-lpthreads} -lc -L/opt/freeware/lib"
 
 #undef LINK_SPEC
 #define LINK_SPEC "-bpT:0x10000000 -bpD:0x20000000 %{!r:-btextro}\
