-version vs. --version

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

-version vs. --version

Christian Jullien-3

Hi guys,

In many cases, you can replace gcc by tcc which accepts (or silently drops) gcc options.

For example, you can run "CC=tcc ./configure" to compile a project with tcc instead of default gcc.

 

Configure.ac may content a line similar to

CCVERSION=`${CC} --version 2>&1 | grep " version " | sed -e "s/^[[A-Za-z ]]*\([[.0-9]]*\).*/\1/g"`

 

However, --version is not supported and produces an error. We must use short form ‘-v’ instead.

As minor request, could it be possible to support both -version --version otherwise we have to modify configure.ac which is not always possible on many source packages.

 

C.


_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: -version vs. --version

Michael Matz-4
Hello,

On Sat, 9 May 2020, Christian Jullien wrote:

> As minor request, could it be possible to support both -version
> --version otherwise we have to modify configure.ac which is not always
> possible on many source packages.

Sure, it's a good idea, added to mob.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel
Reply | Threaded
Open this post in threaded view
|

Re: -version vs. --version

Christian Jullien-3
Thanks Michael.

May I suggest you the diff in attachment which better explains -v, -vv,
--version.
It also display -m32/64 only for supported architecture, Intel processors
atm.

Another thing which annoys me: You must launch "tcc -h && tcc -hh" to get
the complete list of supported options.
gcc is not more coherent:
 gcc --version  gives a short version description
 gcc -v gives a longer description with configure options used

With gcc, you get the complete list of options with "gcc -v --help"

But "tcc -v --help" omits -hh part.

It's not a real request as I can leave with it, but it would be nice if "tcc
-v --help" could work like gcc and produce "tcc -v -h && tcc -v -hh".
FYI: "tcc -v -h -hh" does not what one could expect.

Wdyt?

C.

 
-----Original Message-----
From: Michael Matz [mailto:[hidden email]]
Sent: Sunday, May 10, 2020 22:58
To: [hidden email]; [hidden email]
Subject: Re: [Tinycc-devel] -version vs. --version

Hello,

On Sat, 9 May 2020, Christian Jullien wrote:

> As minor request, could it be possible to support both -version
> --version otherwise we have to modify configure.ac which is not always
> possible on many source packages.

Sure, it's a good idea, added to mob.


Ciao,
Michael.

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel

help.diff (4K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: -version vs. --version

Michael Matz-4
Hello Christian,


On Mon, 11 May 2020, Christian Jullien wrote:

> May I suggest you the diff in attachment which better explains -v, -vv,
> --version.
> It also display -m32/64 only for supported architecture, Intel processors
> atm.

Sure, works for me, push it.

> But "tcc -v --help" omits -hh part.
>
> It's not a real request as I can leave with it, but it would be nice if
> "tcc -v --help" could work like gcc and produce "tcc -v -h && tcc -v
> -hh". FYI: "tcc -v -h -hh" does not what one could expect.
>
> Wdyt?

Yeah, makes sense as well, as -v really is verbose, not just a version
flag, '-v -h' or '-v --help' should give all help screens, care to cobble
up a patch and push it?


Ciao,
Michael.

>
> C.
>
>
> -----Original Message-----
> From: Michael Matz [mailto:[hidden email]]
> Sent: Sunday, May 10, 2020 22:58
> To: [hidden email]; [hidden email]
> Subject: Re: [Tinycc-devel] -version vs. --version
>
> Hello,
>
> On Sat, 9 May 2020, Christian Jullien wrote:
>
>> As minor request, could it be possible to support both -version
>> --version otherwise we have to modify configure.ac which is not always
>> possible on many source packages.
>
> Sure, it's a good idea, added to mob.
>
>
> Ciao,
> Michael.
>

_______________________________________________
Tinycc-devel mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel