Trying to get crosstool-0.43 to work on Solaris 9

Alexander Skwar
Thu Mar 15 15:31:00 GMT 2007

David Kahn <> wrote:

> Alexander Skwar wrote:
>> syntax error at line 95: `;' unexpected
>> Line 95 is the "for arg; do" in the following:
>>     set -x
>>     # Check to see if the tarball already exists
>>     exists=""
>>     for arg; do
>>         case $arg in
>>         *.gz|*.bz2|*.tgz) ;;
>>         *) abort "unknown suffix on url $arg" ;;
>>         esac
>> According to "man ksh", "for arg; do" is correct syntax.
>> ...
>> Ah! In, "sh" is invoked. sh on Solaris 9 does
>> not seem to recognize this syntax. After changing changing line 123
>> from "sh" to "ksh", all is fine.
> And neither does bash on solaris for some reason.

Strange. Well, I replaced "sh" with "ksh" in the script, and
all seems to be fine - so far, and as far as that's concerned ;)

> My fix was to not hardcode sh, and use the
> env variable $SHELL in the crosstool scripts.
> On Solaris, I had success with ksh as you did.


> I already asked Dan to pick that stuff up for
> the next version of crosstool changes.

Great. What was the answer?

> You might also hit this with sed later on as well, you need
> gnu sed (named sed) in your path first before /bin/sed.

Ja, that's what I figured as well. I installed the GNU stuff
from blastwave incl. gnulinks and invoked the ""
script by calling "PATH=/opt/csw/gnu:$PATH sh".
Seems to be coming along somewhat fine.

One annoyance - if the script breaks, I re-run it. It'll then
remove the gcc, ... directories and recreate them. That's taking
"some" time. Can I somehow make crosstool skip this step?

Alexander Skwar

For unsubscribe information see

More information about the crossgcc mailing list