This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
getandpatch.sh: 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 all.sh, "sh getandpatch.sh" is invoked. sh on Solaris 9 does not seem to recognize this syntax. After changing changing line 123 from "sh getandpatch.sh" to "ksh getandpatch.sh", all is fine.
If you search the archives, you should find a post from me with this as well, though I was doing solaris -> ppc.
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.
A bit later, I stumbled over the following problem:
+ test -n + cd /export/home/askwar/cross-compile/crosstool-0.43/build/i686-unknown-linux-gnu/gcc-4.1.0-glibc-2.3.6 + echo hmm maybe cd hmm maybe cd Usage: tar {txruc@}[vfbFXhiBEelmopwnq[0-7]] [-k size] [tapefile] [blocksize] [exclude-file] [-I include-file] files ... cannot unpack /home/askwar/downloads/gdb-6.5.tar.bz2
Problem is, that "tar" is the SUN tar. For starters, it does not know about the "-z" or "-j" options. In line 141 and 143, I exchanged tar with gtar, and all is well. Another more portable fix would be to not rely on GNUisms, but use something like "gzip -cd $TARBALLS_DIR/$ARCHIVE_NAME | tar $VERBOSE -xf -" instead.
Sending this for the sake of the archive - and maybe it might be a good idea, to fix this in upcoming releases of crosstool?
You might also hit this with sed later on as well, you need gnu sed (named sed) in your path first before /bin/sed.
-- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |