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.

Cheers,
-- 
James
GPG Key: 4096R/331BA3DB 2011-12-05 James McCoy <james...@jamessan.com>

-- 
-- 
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 vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui