[Scons-dev] Your advice wanted on issue #1742: TryLink() is too successful sometimes...

Gary Oberbrunner garyo at oberbrunner.com
Tue May 20 18:53:46 EDT 2014


That's an insidious combination of problems there. I don't think much is
expected to work if only g++ is defined and not gcc, but it would be nice
if it didn't fail this badly. Of course the mythical toolchain revamp will
prevent this kind of thing or at least make it harder. But I don't know how
much can be done for this particular case.

-- 
Gary Oberbrunner
(sent from my Android)
On May 20, 2014 5:58 PM, "Dirk Bächle" <tshortik at gmx.de> wrote:

> Hi there,
>
> I'd like to get a second opinion (and third, and...) on the following
> problem:
>
> I'm currently debugging issue #1742 and found out why the TryLink()
> sometimes returns successful, although this shouldn't happen. In the given
> example
>
>   env = Environment(tools = ['g++', 'gnulink'])
>   printCC(env)
>   config = env.Configure()
>   print 'C++ toolchain', config.TryLink('int foo() {}', '.c')
>   config.Finish()
>
> the variable $CC is empty, since the gcc tool doesn't get loaded. But a
> "*.c" file gets compiled, so the smart_link() function returns "$CC" for
> "$SMARTLINK", which is also the definition of "$LINK".
> Finally, the command
>
>   $LINK -o $TARGET $LINKFLAGS $__RPATH $SOURCES $_LIBDIRFLAGS $_LIBFLAGS
>
> evaluates to
>
>   -o ....
>
> , and the leading "-" suppresses the actual return value of the spawn().
>
>
> So we know what happens, but should we do something about it? Does this
> need to get documented somewhere, or would it be good to catch it somehow?
> I don't have a clear idea for the latter option...your comments are welcome.
>
> Best regards,
>
> Dirk
>
> _______________________________________________
> Scons-dev mailing list
> Scons-dev at scons.org
> http://two.pairlist.net/mailman/listinfo/scons-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://two.pairlist.net/pipermail/scons-dev/attachments/20140520/2ec781b1/attachment.html>


More information about the Scons-dev mailing list