Re: GObject Introspection as part of the GNOME platform



On Wed, 2009-03-11 at 20:17 +0100, Mathieu Lacage wrote:
> On Wed, 2009-03-11 at 11:08 -0400, muppet wrote:
> > Johan Dahlin wrote:
> > > As far as I can see there aren't any easy solutions.
> > > We're depending on libffi to calculate struct sizes for the typelib
> > > which is very
> > > much host and compiler dependent.  g-ir-compile really needs to run on the
> > > target system the way things are setup right now. The same applies
> > > for the small generated program which introspects signals & properties, but
> > > that's probably easier to solve.
> > >
> > > In my opinion, supporting cross-compilation shouldn't be a blocker for
> > > integration into glib proper. It's more of a 'nice feature' to support.
> > 
> > I'm sure people putting gnome on phones will disagree.

It's really up to people who care about cross-compiling GLib to make
gobject-introspection work cross-compiled. Someone else could throw some
code in, but it's unlikely to actually work.

And if people don't care about *working* then nothing has to be done -
just don't do any testing of the new features and you'll never know they
are wrong and you won't have any regressions.

Making a "cross" g-ir-compiler work properly is not a big deal - you
need the size and structure alignment of a half-a-dozen types, which
could be done as cache variables, or with fancy tricks of the 
AC_CHECK_SIZEOF() variety.

Then you also have to know what size integers the compiler uses for
enums of different ranges, which can be done with AC_CHECK_SIZEOF().

> > You could do tricks like using the cross compiler to generate assembly instead
> > of machine code from specially-crafted, generated C code, and then parse the
> > resulting assembly to extract the structure sizes and offsets.
> 
> Maybe it is really obvious but, why are you not using the output of
> readelf -wi ? It's fairly trivial to parse and all of this could be done
> on the host without any working target provided you have a
> cross-compiler.

And readelf! and ELF!

- Owen




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