diff mbox

[16/25] Specs cleanup: config/rs6000/sysv4.h LINK_PATH_SPEC

Message ID Pine.LNX.4.64.1101140012500.6059@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers Jan. 14, 2011, 12:13 a.m. UTC
config/rs6000/sysv4.h defines LINK_PATH_SPEC to a definition that

(a) uses paths not appropriate to any supported target for this
architecture;

(b) passes -R options for each -L option, contrary to GCC policy;

(c) is effectively not used for many targets, so these problems aren't
visible in practice (any target overriding LINK_SHLIB_SPEC or
LINK_SPEC ends up not getting this spec included in LINK_SPEC, which
appears to cover all targets using this header for which a native
compiler might be built, and the definition is empty for cross
compilers).

This patch removes the useless and inappropriate definition.  OK to
commit?

2011-01-13  Joseph Myers  <joseph@codesourcery.com>

	* config/rs6000/sysv4.h (LINK_PATH_SPEC): Remove.
	(LINK_SHLIB_SPEC): Don't use %(link_path).
	(SUBTARGET_EXTRA_SPECS): Remove link_path.

Comments

David Edelsohn Jan. 17, 2011, 4:15 p.m. UTC | #1
On Thu, Jan 13, 2011 at 7:13 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> config/rs6000/sysv4.h defines LINK_PATH_SPEC to a definition that
>
> (a) uses paths not appropriate to any supported target for this
> architecture;
>
> (b) passes -R options for each -L option, contrary to GCC policy;
>
> (c) is effectively not used for many targets, so these problems aren't
> visible in practice (any target overriding LINK_SHLIB_SPEC or
> LINK_SPEC ends up not getting this spec included in LINK_SPEC, which
> appears to cover all targets using this header for which a native
> compiler might be built, and the definition is empty for cross
> compilers).
>
> This patch removes the useless and inappropriate definition.  OK to
> commit?
>
> 2011-01-13  Joseph Myers  <joseph@codesourcery.com>
>
>        * config/rs6000/sysv4.h (LINK_PATH_SPEC): Remove.
>        (LINK_SHLIB_SPEC): Don't use %(link_path).
>        (SUBTARGET_EXTRA_SPECS): Remove link_path.

Okay.

Thanks, David
diff mbox

Patch

diff -rupN --exclude=.svn gcc-mainline-15/gcc/config/rs6000/sysv4.h gcc-mainline/gcc/config/rs6000/sysv4.h
--- gcc-mainline-15/gcc/config/rs6000/sysv4.h	2011-01-12 14:36:47.000000000 -0800
+++ gcc-mainline/gcc/config/rs6000/sysv4.h	2011-01-12 14:40:04.000000000 -0800
@@ -600,23 +600,6 @@  extern int fixuplabelno;
 %{!mbss-plt: %{!msecure-plt: %(cc1_secure_plt_default)}} \
 %{profile: -p}"
 
-/* Don't put -Y P,<path> for cross compilers.  */
-#ifndef CROSS_DIRECTORY_STRUCTURE
-#define LINK_PATH_SPEC "\
-%{!R*:%{L*:-R %*}} \
-%{!nostdlib: %{!YP,*: \
-    %{compat-bsd: \
-	%{p:-Y P,/usr/ucblib:/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
-	%{!p:-Y P,/usr/ucblib:/usr/ccs/lib:/usr/lib}} \
-	%{!R*: %{!L*: -R /usr/ucblib}} \
-    %{!compat-bsd: \
-	%{p:-Y P,/usr/ccs/lib/libp:/usr/lib/libp:/usr/ccs/lib:/usr/lib} \
-	%{!p:-Y P,/usr/ccs/lib:/usr/lib}}}}"
-
-#else
-#define LINK_PATH_SPEC ""
-#endif
-
 /* Default starting address if specified.  */
 #define LINK_START_SPEC "\
 %{mads         : %(link_start_ads)         ; \
@@ -644,11 +627,10 @@  extern int fixuplabelno;
 
 /* Shared libraries are not default.  */
 #define LINK_SHLIB_SPEC "\
-%{mshlib: %(link_path) } \
 %{!mshlib: %{!shared: %{!symbolic: -dn -Bstatic}}} \
 %{static: } \
-%{shared:-G -dy -z text %(link_path) } \
-%{symbolic:-Bsymbolic -G -dy -z text %(link_path) }"
+%{shared:-G -dy -z text } \
+%{symbolic:-Bsymbolic -G -dy -z text }"
 
 /* Override the default target of the linker.  */
 #define	LINK_TARGET_SPEC "\
@@ -974,7 +956,6 @@  ncrtn.o%s"
   { "endfile_netbsd",		ENDFILE_NETBSD_SPEC },			\
   { "endfile_openbsd",		ENDFILE_OPENBSD_SPEC },			\
   { "endfile_default",		ENDFILE_DEFAULT_SPEC },			\
-  { "link_path",		LINK_PATH_SPEC },			\
   { "link_shlib",		LINK_SHLIB_SPEC },			\
   { "link_target",		LINK_TARGET_SPEC },			\
   { "link_start",		LINK_START_SPEC },			\