From afec0ea990f65f9c385f63e5d592d3ddaebd94d1 Mon Sep 17 00:00:00 2001 From: Michael Meissner Date: Thu, 25 May 1995 15:42:32 +0000 Subject: [PATCH] If cross compiler or if -nostdlib, do not pass -YP to linker. From-SVN: r9819 --- gcc/config/rs6000/sysv4.h | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/gcc/config/rs6000/sysv4.h b/gcc/config/rs6000/sysv4.h index 5265764..ce7052d 100644 --- a/gcc/config/rs6000/sysv4.h +++ b/gcc/config/rs6000/sysv4.h @@ -341,7 +341,9 @@ while (0) #define CPP_PREDEFINES \ "-DPPC -Dunix -D__svr4__ -Asystem(unix) -Asystem(svr4) -Acpu(powerpc) -Amachine(powerpc)" +/* Don't put -Y P, for cross compilers */ #undef LINK_SPEC +#ifdef CROSS_COMPILE #define LINK_SPEC "\ %{h*} %{V} %{v:%{!V:-V}} \ %{b} %{Wl,*:%*} \ @@ -350,12 +352,25 @@ while (0) %{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \ %{G:-G} \ %{YP,*} \ -%{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ -%{!p:-Y P,/usr/ccs/lib:/usr/lib}} \ %{Qy:} %{!Qn:-Qy} \ %{mlittle: -oformat elf32-powerpcle } %{mlittle-endian: -oformat elf32-powerpcle } \ %{mbig: -oformat elf32-powerpc } %{mbig-endian: -oformat elf32-powerpc }" +#define LINK_SPEC "\ +%{h*} %{V} %{v:%{!V:-V}} \ +%{b} %{Wl,*:%*} \ +%{static:-dn -Bstatic} \ +%{shared:-G -dy -z text %{!h*:%{o*:-h %*}}} \ +%{symbolic:-Bsymbolic -G -dy -z text %{!h*:%{o*:-h %*}}} \ +%{G:-G} \ +%{YP,*} \ +%{!nostdlib: %{!YP,*:%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \ + %{!p:-Y P,/usr/ccs/lib:/usr/lib}}} \ +%{Qy:} %{!Qn:-Qy} \ +%{mlittle: -oformat elf32-powerpcle } %{mlittle-endian: -oformat elf32-powerpcle } \ +%{mbig: -oformat elf32-powerpc } %{mbig-endian: -oformat elf32-powerpc }" +#endif /* CROSS_COMPILE */ + #undef CPP_SPEC #define CPP_SPEC "\ %{posix: -D_POSIX_SOURCE} \ -- 2.7.4