Re: About -print-prog-name exist status

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

 



On Wed, Apr 21, 2021 at 6:27 AM Tadeus Prastowo
<tadeus.prastowo@xxxxxxxx> wrote:
>
> On Wed, Apr 21, 2021 at 6:20 AM Peng Yu via Gcc-help
> <gcc-help@xxxxxxxxxxx> wrote:
> >
> > It seems when -print-prog-name does not exist. gcc still returns
> > normally. This doesn't make much sense. Shouldn't it return a nonzero
> > exist status in such a case? Thanks.
> >
> > $ gcc -print-prog-name=blahblah; echo $?
> > blahblah
> > 0
>
> It returns normally because the option is provided as a service to
> find out about the absolute path of a possibly-hypothetical library,
> which is useful when you intend to build that library.

That is for -print-file-name [1].  But the rationale applies to
-print-prog-name.  The absolute path is also useful to build/search
something relative to where the given program name is expected by GCC
to exist.

[1] https://gcc.gnu.org/onlinedocs/gcc/Developer-Options.html#Developer-Options

> > --
> > Regards,
> > Peng

-- 
Best regards,
Tadeus



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux