Re: [Vala] how to specify C toolchain to valac?



On Fri, 2010-08-06 at 09:27 -0700, Nigel Griffin wrote:
Hi,

Environment: Ubuntu 10.04 x86_64

Is there a way to specify to valac what C compiler (and C toolchain in
general) to use?  I'm attempting to cross compile a program written in
vala (which, I presume, only requires that the generated C code is
cross compiled).

You can tell valac which C compiler to use by using the --cc argument.
If you prefer, you can have valac simply skip the compilation step
entirely by passing -C. You can get a full list of command line options
either from valac --help, or by reading the valac man page.

The most popular way to build Vala software is probably with autotools,
which will pass -C to vala and handles the compiling and linking just as
in C. Cross compiling Vala which uses an autotools based build system
should be no different than cross compiling C with autotools.



So far, it seems that my only options are:

1) add the location of the cross compiler to my PATH so that it always
finds the cross compiler gcc first
2) Hand edit makefiles and set the toolchain there

If anyone has experience here, any suggestions on how best to proceed
would be greatly appreciated.  Ideally, I would prefer to tell valac
directly what toolchain to use.

-Nigel Griffin
_______________________________________________
vala-list mailing list
vala-list gnome org
http://mail.gnome.org/mailman/listinfo/vala-list





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