From patchwork Fri Jan 14 00:13:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 78844 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 36F74B70B3 for ; Fri, 14 Jan 2011 11:13:39 +1100 (EST) Received: (qmail 19725 invoked by alias); 14 Jan 2011 00:13:37 -0000 Received: (qmail 19701 invoked by uid 22791); 14 Jan 2011 00:13:33 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 14 Jan 2011 00:13:29 +0000 Received: (qmail 14386 invoked from network); 14 Jan 2011 00:13:27 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 14 Jan 2011 00:13:27 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1PdXIE-0002RW-O4; Fri, 14 Jan 2011 00:13:26 +0000 Date: Fri, 14 Jan 2011 00:13:26 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org cc: geoffk@geoffk.org, dje.gcc@gmail.com Subject: [16/25] Specs cleanup: config/rs6000/sysv4.h LINK_PATH_SPEC In-Reply-To: Message-ID: References: MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org 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 * config/rs6000/sysv4.h (LINK_PATH_SPEC): Remove. (LINK_SHLIB_SPEC): Don't use %(link_path). (SUBTARGET_EXTRA_SPECS): Remove link_path. 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, 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 }, \