From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6617 invoked by alias); 19 Jan 2018 17:49:25 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 6606 invoked by uid 89); 19 Jan 2018 17:49:24 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=H*Ad:U*schwab X-HELO: mail-qt0-f196.google.com Received: from mail-qt0-f196.google.com (HELO mail-qt0-f196.google.com) (209.85.216.196) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 19 Jan 2018 17:49:23 +0000 Received: by mail-qt0-f196.google.com with SMTP id 33so5782512qtv.1 for ; Fri, 19 Jan 2018 09:49:23 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Z3NKGltQlSmIt8K8ZKUiR+4KzqaMlXsQu3ADGaH5iDE=; b=oB9ijYaxZCpLp8Wb1HuCpz8pS+zHFrj2e5pgDcz9EuS8H92v2wmL4ZvT515epNG5Wp MIX+Jt4vPTVmBbMaSUib2c0wGX/CJtjLlSCeLnuWZh3JOjiEeOYcoRvBkjxaZCjZ6UpC HOQUDL9OP/zqQLyZMUysrlsJ/FMsLq0UkBdp0Nd77cDyK5srCHJzmnfAU0Cf5fG70kp7 JXHV6yCmJDUD8h7X4CW0LEQhegCZyEn1P0kpA5jbxIPCtrUeXi3+q/tp9WOtRcixbcxH vBN4rYmBzy8nYwqUpW2jjOSbvttsB2jLl4houjBXdNchphKZAgoM4Vc9VSCPlQY3v1W5 LP8g== X-Gm-Message-State: AKwxytf1n5mjo0rBOL///b6MHSW/mUTTu4n6STUr/vo68+bgccRuCNT/ /M+woIPzc/lpNnpZ6+hkXrnRLzlN/TtNyttDHCI= X-Google-Smtp-Source: ACJfBotxrw9y3/k4gomva+I8iwmWK+BhE5pWufqR2mYLZl+p9ychZbNLX4wrDY+kXRPbiSjFJZjtHZ15OUDMfio1Ips= X-Received: by 10.200.67.75 with SMTP id a11mr53603017qtn.197.1516384161642; Fri, 19 Jan 2018 09:49:21 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.153.232 with HTTP; Fri, 19 Jan 2018 09:49:21 -0800 (PST) In-Reply-To: <498b69e2-1204-b286-4284-90f148372d05@redhat.com> References: <1516353450-16357-1-git-send-email-yao.qi@linaro.org> <87fu714y19.fsf@linux-m68k.org> <498b69e2-1204-b286-4284-90f148372d05@redhat.com> From: Yao Qi Date: Fri, 19 Jan 2018 17:49:00 -0000 Message-ID: Subject: Re: [committed] Don't pass -m32 to libcc1 on arm-linux To: Pedro Alves Cc: Andreas Schwab , GDB Patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes X-SW-Source: 2018-01/txt/msg00409.txt.bz2 On Fri, Jan 19, 2018 at 4:34 PM, Pedro Alves wrote: > On 01/19/2018 04:24 PM, Andreas Schwab wrote: >> On Jan 19 2018, Yao Qi wrote: >> >>> This patch fixes it by implementing gcc_target_options gdbarch method >>> for arm-linux to override option "-m32". >> >> Why is that not the default? > I think for really no good reason other than the coincidence that > the first couple ports that implemented this hook could share the > same set of "-m" options. The compile project was started for x86, so it had x86 options in default. char * default_gcc_target_options (struct gdbarch *gdbarch) { return xstrprintf ("-m%d%s", gdbarch_ptr_bit (gdbarch), gdbarch_ptr_bit (gdbarch) =3D=3D 64 ? " -mcmodel=3Dlarge" : ""); } which is not correct for other arches. What is more, we have no way to disable "compile" feature even it is not support on some arches. If libcc1.so can be loaded in GDB, GDB thinks everything is OK, and use it unconditionally for "compile" feature. --=20 Yao (=E9=BD=90=E5=B0=A7)