Re: Improving cross compilation



On Wed, 2002-12-18 at 03:48, Allin Cottrell wrote:
> On Tue, 17 Dec 2002, Owen Taylor wrote:
> > Michael Taht <mtaht mvista com> writes:
> > > Is there room on the schedule for the next release to improve cross
> > > compilation for all the gtk related libraries, notably pkg-config?
> > If you mean, by next release, the GTK+-2.4 release, sure, if
> > someone wants to do the work and submits patches.
> >
> > I think for pkg-config, the main thing would simply be figuring
> > out how it should work. A fairly obvious possibility would
> > to:
> >
> >  A) make pkg-config support --target in it's configure to
> >     install prefixed by $(host_alias)
> >
> >  B) Make PKG_CHECK_MODULES look for the $(host_alias) prefixed
> >     pkg-config.
> 
> I'm not sure that work is necessary, given the ability to set
> PKG_CONFIG_PATH.  One can have just one installation of pkg-config
> that serves all targets.  E.g. I use plain /usr/bin/pkg-config in
> setting up makefiles on Linux for cross-compiling GTK-based programs
> for win32; I just ask it to look in /opt/mingw32/lib/pkgconfig for the
> package info.

To cross-compile my app with glib on sh4 I just added these lines to my
configure.in:

# Setup any cross-compile specialities if we are building for another
target
# (eventually these paths should be in our own build tree)
case $target_alias in
        sh4* )
                echo "Setting up cross-compile variables"
                CC=sh4-linux-gcc
                export
PKG_CONFIG_PATH=/opt/STM/ST40Linux-1.0/devkit/sh4/lib/pkgconfig/
                ;;
esac

And left the existing PKG_CONFIG lines unchanged. Works fine.

> 
> Allin Cottrell.
> _______________________________________________
> gtk-app-devel-list mailing list
> gtk-app-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
> 
-- 
Alex Bennee
Senior Hacker, Braddahead Ltd
The above is probably my personal opinion and may not be that of my
employer




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