[gccsdk] [GCCSDK commit] jjvdgeer - r4136 - trunk/autobuilder/develop/vala

Jan-Jaap van der Geer jjvdgeer at inbox.com
Mon Sep 28 23:22:32 PDT 2009


Peter Naulls wrote:
> Jan-Jaap van der Geer wrote:
>> On Mon, 2009-09-28 at 13:00 -0700, Peter Naulls wrote:
>>> Right now, the Vala build assumes a native installed valac, which is
>>> used during the build.  This is perhaps ok, but it might make more
>>> sense
>>> to bootstrap it (since it's not something people would normally have) -
>>> that is, do a native build from the sources, save the binary, then the
>>> cross build.   We do similarly for the orbit2 build, and a couple of
>>> other things.
 
>> That sounds like a good idea. I experimented a bit with this, I
>> basically copied that what was done in orbit2. But as the vala sources
>> are patched, trying to build the native valac now also requires valac,
>> so I need to compile the code *before* the RISC OS patches are applied.
>> How can I accomplish that?

> You need to adjust your patches so they have #if __riscos__ wrappers.
> You would need to do that anyway, if you were planning to submit
> upstream.  Then you can use the same source for the native and
> cross builds.

Either I don't understand or I think it is not going to work.

I think you're suggesting the patches will contain these #if __riscos__ wrappers. I checked the FAQ and although Vala has a minimal preprocessor, it has #if, but no #define and as far as I know no predefined values. However, the valac executable has a -D to define preprocessor stuff, so it would be possible to define __riscos__ within the makefile. How to do that via the configure stuff I do not know, but I suppose that should be easy to do by patching some files used to generate the makefile. It would still have to differentiate between the native build and the RISC OS build though. Not sure about that one.

But that is not the main issue. As the patches operate on the .vala files, the .vala files will be newer than the .c files which are generated from the .vala files (they are just supplied so you do not need a vala compiler to build it. A "make clean" will remove them...). So "#if __riscos__" or not, the vala compiler will be needed to compile a native compiler if we are applying the patches before building a native compiler. Chicken and egg...

Cheers,
Jan-Jaap



More information about the gcc mailing list