Re: Handling of -specs in cgcc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[Added the new address to the CC]

On Sun, Jul 20, 2008 at 10:28 PM, Alexey Zaytsev
<alexey.zaytsev@xxxxxxxxx> 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@xxxxxxxxx>
>
> 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;
>  }
>
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux