linux-sparse.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Alexey Zaytsev" <alexey.zaytsev@gmail.com>
To: Josh Triplett <josht@linux.vnet.ibm.com>
Cc: Morten Welinder <mwelinder@gmail.com>,
	linux-sparse@vger.kernel.org, Morten Welinder <terra@gnome.org>
Subject: Re: Handling of -specs in cgcc
Date: Tue, 22 Jul 2008 22:11:22 +0400	[thread overview]
Message-ID: <f19298770807221111t7277a49ek3931f0b1e5061957@mail.gmail.com> (raw)
In-Reply-To: <1216749832.4485.30.camel@josh-work.beaverton.ibm.com>

On Tue, Jul 22, 2008 at 10:03 PM, Josh Triplett
<josht@linux.vnet.ibm.com> wrote:
> On Tue, 2008-07-22 at 13:43 -0400, Morten Welinder wrote:
>> > But won't gcc fail in such case?
>>
>> It will not fail, as gcc does not see any of it.  But since the defines might
>> not match what gcc runs with, you might get interesting effects.
>>
>> > Maybe we should not remove, but replace it
>> > with a unique option to specify for which architecture sparse should check?
>>
>> That's certainly possible, but I would wait for an actual problem showing
>> up before fixing anything.  Right now, we can use -specs to get an idea
>> what sparse would find for a different arch without actually having a gcc
>> around that can cross compile.
>
> In general, it seems questionable to have cgcc handle an option named
> identically to one in GCC but have it behave differently than GCC.
>
> That said, I do think Sparse should handle different architectures
> without requiring compilation of a "cross-Sparse"; it really just needs
> a specs-equivalent for each architecture.
>
> - Josh Triplett

How about just s/specs/arch/ ?

diff --git a/cgcc b/cgcc
index 4fab530..f4417dc 100755
--- a/cgcc
+++ b/cgcc
@@ -23,7 +23,7 @@ foreach (@ARGV) {
     $m32 = 1 if /^-m32$/;
     $m64 = 1 if /^-m64$/;

-    if (/^-specs=(.*)$/) {
+    if (/^-arch=(.*)$/) {
        $check .= &add_specs ($1);
        $has_specs = 1;
        next;

      reply	other threads:[~2008-07-22 18:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20 18:28 Handling of -specs in cgcc Alexey Zaytsev
2008-07-22 17:00 ` Alexey Zaytsev
2008-07-22 17:20   ` Morten Welinder
2008-07-22 17:28     ` Alexey Zaytsev
2008-07-22 17:43       ` Morten Welinder
2008-07-22 17:59         ` Alexey Zaytsev
2008-07-22 18:03         ` Josh Triplett
2008-07-22 18:11           ` Alexey Zaytsev [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f19298770807221111t7277a49ek3931f0b1e5061957@mail.gmail.com \
    --to=alexey.zaytsev@gmail.com \
    --cc=josht@linux.vnet.ibm.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=mwelinder@gmail.com \
    --cc=terra@gnome.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).