diff --git a/gcc/config/pa/pa-hpux.h b/gcc/config/pa/pa-hpux.h index ef8257aaf83b..3459982e9bc7 100644 --- a/gcc/config/pa/pa-hpux.h +++ b/gcc/config/pa/pa-hpux.h @@ -43,7 +43,7 @@ Boston, MA 02111-1307, USA. */ #undef LINK_SPEC #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1) #define LINK_SPEC \ - "%{!mpa-risc-1-0:-L/lib/pa1.1 -L/usr/lib/pa1.1 }%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}" + "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }}%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}" #else #define LINK_SPEC \ "%{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{g*:-a archive} %{shared:-b}" diff --git a/gcc/config/pa/pa-hpux10.h b/gcc/config/pa/pa-hpux10.h index cd72c4743cc4..730f65e7281e 100644 --- a/gcc/config/pa/pa-hpux10.h +++ b/gcc/config/pa/pa-hpux10.h @@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */ #undef LINK_SPEC #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1) #define LINK_SPEC \ - "%{!mpa-risc-1-0:-L/lib/pa1.1 -L/usr/lib/pa1.1} -z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}" + "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}" #else #define LINK_SPEC \ "-z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}" diff --git a/gcc/config/pa/pa-hpux9.h b/gcc/config/pa/pa-hpux9.h index 67e8d2289f7c..95b031e8c8de 100644 --- a/gcc/config/pa/pa-hpux9.h +++ b/gcc/config/pa/pa-hpux9.h @@ -24,7 +24,7 @@ Boston, MA 02111-1307, USA. */ #undef LINK_SPEC #if ((TARGET_DEFAULT | TARGET_CPU_DEFAULT) & 1) #define LINK_SPEC \ - "%{!mpa-risc-1-0:-L/lib/pa1.1 -L/usr/lib/pa1.1} -z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}" + "%{!mpa-risc-1-0:%{!shared:-L/lib/pa1.1 -L/usr/lib/pa1.1 }} -z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}" #else #define LINK_SPEC \ "-z %{mlinker-opt:-O} %{!shared:-u main} %{static:-a archive} %{shared:-b}"