Wednesday, 4 February 2015

Re: [gccsdk] make: File '-c' not found

In message <op.xth4qnuxizronj@bluey>
WPB <wpb.feed@gmx.com> wrote:


> Presumably it's UnixLib that handles the "/bin/sh" references getting
> passed to the RISC OS CLI, is it? If so, knowing the date when that
> happened in UnixLib and comparing to the date that code was added to job.c
> might give us a clue?
>
> WPB

I described it earlier as being compiled in by the cross-compiler, but
it is better described as a unixlib feature, the same way the linux /tmp
gets translated to the scrap dir.
Output from the RISC OS !GCC is identical to the output of the
cross-compiler. The cross-compiler shares the advanced project tools to
that of native linux, necessary for massive/complex sources.

Duncan, the question you asked (email by mistake)

>I'm not sure what 'make' does when it's run from the dash shell. Since
>printf is builtin, does 'make' bypass using exec()? Does anyone know if
>that's likely?

No, make is started by the CLI in the normal way, but when a command
like printf is encountered it checks which shell to call
it with (forking probably).
As of the latest change, default is /bin/sh --> CLI but this can be
over-ridden by the SHELL variable in the makefile.

It /is/ possible to start make with 'dash -c make' but make would
still have to call another shell for an external command and there is no
functional difference or gain to be made.

The advantage of having make call dash to do the commands make doesn't
know, is when you have a linux style makefile.
Then most of the bash like language will work. (for, if etc)
The main exception, of course, being the | (pipe)
I read that unlike other shells, dash does fork at a pipe, wether that
will be helpful remains to be seen.
It is usually possible to split the pipe commands and use a temp file.

Ron M.


_______________________________________________
GCCSDK mailing list gcc@gccsdk.riscos.info
Bugzilla: http://www.riscos.info/bugzilla/index.cgi
List Info: http://www.riscos.info/mailman/listinfo/gcc
Main Page: http://www.riscos.info/index.php/GCCSDK

No comments:

Post a Comment