James McCoy wrote:
> On Thu, Sep 03, 2015 at 10:01:18PM +0200, Bram Moolenaar wrote:
> > Byte Termite wrote:
> > > Hi there,
> > >
> > > I am cross compiling vim from the git repository I just checked out.
> > > ...
> > > iconv -f utf-8 -t cp932 ja.po | ./sjiscorr > ja.sjis.po
> > > /bin/sh: ./sjiscorr: cannot execute binary file: Exec format error
> > >
> > > MY WORK AROUND:
> > >
> > > $ git diff Makefile
> > > diff --git a/src/po/Makefile b/src/po/Makefile
> > > index d9aa834..272695e 100644
> > > --- a/src/po/Makefile
> > > +++ b/src/po/Makefile
> > > @@ -202,7 +202,8 @@ ja.sjis.po: ja.po
> > > iconv -f utf-8 -t cp932 ja.po | ./sjiscorr > ja.sjis.po
> > >
> > > sjiscorr: sjiscorr.c
> > > - $(CC) -o sjiscorr sjiscorr.c
> > > + #$(CC) -o sjiscorr sjiscorr.c
> > > + gcc -o sjiscorr sjiscorr.c
> > >
> > > ja.euc-jp.po: ja.po
> > > iconv -f utf-8 -t euc-jp ja.po | \
> >
> > $CC is passed from the main Makefile to po/Makefile, so why does it have
> > the wrong value?
>
> Because $CC is the compiler for the target system, not the native system.
> sjiscorr needs to be built by the native compiler, so it can be run to
> generate ja.sjis.po.
>
> It would probably be better to have something like:
>
> CC_FOR_BUILD ?= $(CC)
>
> and then use $(CC_FOR_BUILD) to build anything that needs to run during
> the build.
Well, normally you would build the local binary first, before doing the
cross-compile build. That works, right?
--
ARTHUR: It is I, Arthur, son of Uther Pendragon, from the castle of Camelot.
King of all Britons, defeator of the Saxons, sovereign of all England!
[Pause]
SOLDIER: Get away!
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.