From: "Alexey Zaytsev" <alexey.zaytsev@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Morten Welinder <terra@gnome.org>
Subject: Re: Handling of -specs in cgcc
Date: Tue, 22 Jul 2008 21:00:27 +0400 [thread overview]
Message-ID: <f19298770807221000o5905fefw44b0f420787baf9e@mail.gmail.com> (raw)
In-Reply-To: <f19298770807201128s3688702fm3f8b2f42edb198fc@mail.gmail.com>
[Added the new address to the CC]
On Sun, Jul 20, 2008 at 10:28 PM, Alexey Zaytsev
<alexey.zaytsev@gmail.com> wrote:
> Hi.
>
> Looking at cgcc, it seems that this code does not actually work,
>
> 26 if (/^-specs=(.*)$/) {
> 27 $check .= &add_specs ($1);
> 28 $has_specs = 1;
> 29 next;
> 30 }
>
> because add_specs() never expects to see a file name, and
> the option is removed from the argument list and never passed
> to gcc. As it seems that this feature never worked, probably
> we could simply remove it? Morten?
>
> ---
>
> Pass -specs to gcc without trying (and failing) to decompose it.
>
> Signed-off-by: Alexey Zaytsev <alexey.zaytsev@gmail.com>
>
> diff --git a/cgcc b/cgcc
> index 4fab530..a1d4f66 100755
> --- a/cgcc
> +++ b/cgcc
> @@ -23,12 +23,6 @@ foreach (@ARGV) {
> $m32 = 1 if /^-m32$/;
> $m64 = 1 if /^-m64$/;
>
> - if (/^-specs=(.*)$/) {
> - $check .= &add_specs ($1);
> - $has_specs = 1;
> - next;
> - }
> -
> if ($_ eq '-no-compile') {
> $do_compile = 0;
> next;
> @@ -83,6 +77,8 @@ sub cc_only_option {
> # ones. Don't include it just because a project wants to pass -Wall to cc.
> # If you really want cgcc to run sparse with -Wall, use
> # CHECK="sparse -Wall".
> +
> + return 1 if $arg =~ /^-specs=.*/;
> return 1 if $arg =~ /^-Wall$/;
> return 0;
> }
>
next prev parent reply other threads:[~2008-07-22 17:00 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 [this message]
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
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=f19298770807221000o5905fefw44b0f420787baf9e@mail.gmail.com \
--to=alexey.zaytsev@gmail.com \
--cc=linux-sparse@vger.kernel.org \
--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).