From patchwork Thu Dec 2 16:33:59 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 73990 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 26734B6F1E for ; Fri, 3 Dec 2010 03:34:15 +1100 (EST) Received: (qmail 18220 invoked by alias); 2 Dec 2010 16:34:10 -0000 Received: (qmail 18021 invoked by uid 22791); 2 Dec 2010 16:34:07 -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; Thu, 02 Dec 2010 16:34:02 +0000 Received: (qmail 20238 invoked from network); 2 Dec 2010 16:34:01 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 2 Dec 2010 16:34:01 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.72) (envelope-from ) id 1POC6Z-0007UB-Pd for gcc-patches@gcc.gnu.org; Thu, 02 Dec 2010 16:33:59 +0000 Date: Thu, 2 Dec 2010 16:33:59 +0000 (UTC) From: "Joseph S. Myers" To: gcc-patches@gcc.gnu.org Subject: [2/9] Specs cleanup: -A, -d and -m for linker 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 LINK_COMMAND_SPEC (including modified copies for two targets) passes -A, -d and -m to the linker and has further %{!A:...} specs. This is not consistent with the semantics of -A (preprocessor assert), -d (compiler dump) and -m (prefix to machine-specific compiler options; if passed on its own, will get passed to cc1 then rejected by cc1) in GCC. Thus, this patch removes that specs handling; any such options actually needing to be passed to the linker must be passed using -Wl, or -Xlinker. 2010-12-02 Joseph Myers * gcc.c (LINK_COMMAND_SPEC): Don't handle -A, -d or -m. * config/darwin.h (LINK_COMMAND_SPEC_A): Likewise. * config/i386/djgpp.h (LINK_COMMAND_SPEC): Likewise. diff -rupN --exclude=.svn gcc-mainline-1/gcc/config/darwin.h gcc-mainline/gcc/config/darwin.h --- gcc-mainline-1/gcc/config/darwin.h 2010-11-30 03:36:38.000000000 -0800 +++ gcc-mainline/gcc/config/darwin.h 2010-12-01 16:46:05.000000000 -0800 @@ -172,17 +172,17 @@ extern GTY(()) int darwin_ms_struct; %(linker) \ %{flto*:%