Re: patch to allow cross-compilation of glib



Hi,

Sven Neumann <sven gimp org> writes:
> at the moment, glib can not be cross-compiled, since it executes
> the glib-genmarshal binary created for the target platform during
> the build. 

Maybe it shouldn't.  Isn't the output of 'glib-genmarshal' target
independent.  I think the best option is to create 'gmarshal.c' on a
native build, and cross-compile that.

So, 

    cd path/to/glib
    mkdir -p build/native build/cross
    cd build/native && do native configure && make
    cd ../cross && do cross configure --disable-rebuilds && make

should do the trick.

> The included patch adds the configure option
> --with-glib-genmarshal=PATH that allows to specify the path to an
> installed version of glib-genmarshal to be used to generate the
> marshaller code. 

I think it is somewhat ugly.  There's should be no need for this
option on a tarball generated with 'make dist'.  If you change
marshal.list, you can easily rebuild a target independent gmarshal.c
with a parallel native build.  On the whole, I don't see this as being
very useful.

> Is it OK to commit?

I'll leave that up to Owen or Tim.

- Hari
-- 
Raja R Harinath ------------------------------ harinath cs umn edu
"When all else fails, read the instructions."      -- Cahn's Axiom
"Our policy is, when in doubt, do the right thing."   -- Roy L Ash




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]