Erick Tryzelaar | 1 Apr 04:29 2011
Picon

Re: cross compiling felix run time library

On Thu, Mar 31, 2011 at 6:26 AM, Rhythmic Fistman <rfistman <at> gmail.com> wrote:
> I'm trying to compile the felix RTL for the iphone, and although
> configure recognises configure --target-cc=mygcc --target-cxx=myg++
> it doesn't seem to do anything and the RTL is built for the host architecture.
>
> I can get a working rtl for the iphone simulator (i386, not x86_64) by
> replacing gcc/g++:
>
> PATH=$XCOMPILERS:$PATH make configure build
>
> but that only works because the binaries created happen to run on x86_64.
>
> When compiling for armv6, configure fails right away:
>
> configuring build phase
> checking gcc             : failed
> gcc failed to compile an exe
>
>
> Should I be setting some other combination of host/build/target-cc/cxx
> or is cross compiling broken?

I think fbuild's iphone support atrophied a little bit. I'll see if I
can get it up and running again.

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
(Continue reading)

Rhythmic Fistman | 1 Apr 11:33 2011
Picon

Re: cross compiling felix run time library

On 1 April 2011 04:29, Erick Tryzelaar <erick.tryzelaar@...> wrote:
> On Thu, Mar 31, 2011 at 6:26 AM, Rhythmic Fistman
<rfistman@...> wrote:
>> I'm trying to compile the felix RTL for the iphone, and although
>> configure recognises configure --target-cc=mygcc --target-cxx=myg++
>> it doesn't seem to do anything and the RTL is built for the host architecture.
>>
>> I can get a working rtl for the iphone simulator (i386, not x86_64) by
>> replacing gcc/g++:
>>
>> PATH=$XCOMPILERS:$PATH make configure build
>>
>> but that only works because the binaries created happen to run on x86_64.
>>
>> When compiling for armv6, configure fails right away:
>>
>> configuring build phase
>> checking gcc             : failed
>> gcc failed to compile an exe
>>
>>
>> Should I be setting some other combination of host/build/target-cc/cxx
>> or is cross compiling broken?
>
> I think fbuild's iphone support atrophied a little bit. I'll see if I
> can get it up and running again.

Oh great, there's support?

Only a little atrophied, it got through a screen or so of config before failing:
(Continue reading)

john skaller | 1 Apr 12:14 2011
Picon
Picon

Re: cross compiling felix run time library


On 01/04/2011, at 1:29 PM, Erick Tryzelaar wrote:

> On Thu, Mar 31, 2011 at 6:26 AM, Rhythmic Fistman
<rfistman@...> wrote:
>> I'm trying to compile the felix RTL for the iphone, and although
>> configure recognises configure --target-cc=mygcc --target-cxx=myg++
>> it doesn't seem to do anything and the RTL is built for the host architecture.
>> 
>> I can get a working rtl for the iphone simulator (i386, not x86_64) by
>> replacing gcc/g++:
>> 
>> PATH=$XCOMPILERS:$PATH make configure build
>> 
>> but that only works because the binaries created happen to run on x86_64.
>> 
>> When compiling for armv6, configure fails right away:
>> 
>> configuring build phase
>> checking gcc             : failed
>> gcc failed to compile an exe
>> 
>> 
>> Should I be setting some other combination of host/build/target-cc/cxx
>> or is cross compiling broken?
> 
> I think fbuild's iphone support atrophied a little bit. I'll see if I
> can get it up and running again.

Yeah, but the question is why didn't the --target-cxx thing work?
(Continue reading)

Rhythmic Fistman | 1 Apr 12:29 2011
Picon

Re: cross compiling felix run time library

On 1 April 2011 12:14, john skaller <skaller@...> wrote:
>
> On 01/04/2011, at 1:29 PM, Erick Tryzelaar wrote:
>
>> On Thu, Mar 31, 2011 at 6:26 AM, Rhythmic Fistman
<rfistman@...> wrote:
>>> I'm trying to compile the felix RTL for the iphone, and although
>>> configure recognises configure --target-cc=mygcc --target-cxx=myg++
>>> it doesn't seem to do anything and the RTL is built for the host architecture.
>>>
>>> I can get a working rtl for the iphone simulator (i386, not x86_64) by
>>> replacing gcc/g++:
>>>
>>> PATH=$XCOMPILERS:$PATH make configure build
>>>
>>> but that only works because the binaries created happen to run on x86_64.
>>>
>>> When compiling for armv6, configure fails right away:
>>>
>>> configuring build phase
>>> checking gcc             : failed
>>> gcc failed to compile an exe
>>>
>>>
>>> Should I be setting some other combination of host/build/target-cc/cxx
>>> or is cross compiling broken?
>>
>> I think fbuild's iphone support atrophied a little bit. I'll see if I
>> can get it up and running again.
>
(Continue reading)

Rhythmic Fistman | 1 Apr 12:46 2011
Picon

Re: cross compiling felix run time library

On 1 April 2011 12:29, Rhythmic Fistman <rfistman@...> wrote:
> On 1 April 2011 12:14, john skaller <skaller@...> wrote:
>>
>> On 01/04/2011, at 1:29 PM, Erick Tryzelaar wrote:
>>
>>> On Thu, Mar 31, 2011 at 6:26 AM, Rhythmic Fistman
<rfistman@...> wrote:
>>>> I'm trying to compile the felix RTL for the iphone, and although
>>>> configure recognises configure --target-cc=mygcc --target-cxx=myg++
>>>> it doesn't seem to do anything and the RTL is built for the host architecture.
>>>>
>>>> I can get a working rtl for the iphone simulator (i386, not x86_64) by
>>>> replacing gcc/g++:
>>>>
>>>> PATH=$XCOMPILERS:$PATH make configure build
>>>>
>>>> but that only works because the binaries created happen to run on x86_64.
>>>>
>>>> When compiling for armv6, configure fails right away:
>>>>
>>>> configuring build phase
>>>> checking gcc             : failed
>>>> gcc failed to compile an exe
>>>>
>>>>
>>>> Should I be setting some other combination of host/build/target-cc/cxx
>>>> or is cross compiling broken?
>>>
>>> I think fbuild's iphone support atrophied a little bit. I'll see if I
>>> can get it up and running again.
(Continue reading)

john skaller | 1 Apr 12:50 2011
Picon
Picon

Re: cross compiling felix run time library


On 01/04/2011, at 9:29 PM, Rhythmic Fistman wrote:
> 
> I'll try again.  Here are my build steps
> 
> rm .gitignore  # makes git clean -fd work
> git clean -fd   # there's no make clean, and heaps of hidden state

I normally just use 

rm -rf build

since most of the state is in the build directory. Actually we should investigate
how to do this properly..

you should actually do a standard and install, then an iphone build and
install (to a different location obviously). The two versions should coexist.
I'm sure Erick will explain how to do this... I think it can be done..

> python3 fbuild/fbuild-light configure --target-cc=xgcc --target-cxx=xg++
> 
> Now it gets a long way and fails at
> * iscr extracting                      :
> /Users/rfistman/armv6/felix/lpsrc/flx_maker.pak

> 
> Interscript? I thought interscript and literate programming were dead.

Yes, unfortunately there's a small amount of residual code 
generation in that one file.
(Continue reading)

Rhythmic Fistman | 1 Apr 13:12 2011
Picon

can't infer null[T]?

I was binding some c code and needed to use null pointer.
Obviously 0 didn't work (it's an int, not a pointer!) but then I
remembered c_hack
and null[T] and did this:

proc do_something: &long_type_name = "c_do_something($1);";

var x : long_type_name;
do_something(&x);
/* ... */
do_something(null[long_type_name]);

Do I really have to type null[long_type_name]? Why can't I just type null?

RF

------------------------------------------------------------------------------
Create and publish websites with WebMatrix
Use the most popular FREE web apps or write code yourself; 
WebMatrix provides all the features you need to develop and 
publish your website. http://p.sf.net/sfu/ms-webmatrix-sf
john skaller | 1 Apr 17:31 2011
Picon
Picon

Re: can't infer null[T]?


On 01/04/2011, at 10:12 PM, Rhythmic Fistman wrote:

> I was binding some c code and needed to use null pointer.
> Obviously 0 didn't work (it's an int, not a pointer!) but then I
> remembered c_hack
> and null[T] and did this:
> 
> proc do_something: &long_type_name = "c_do_something($1);";
> 
> var x : long_type_name;
> do_something(&x);
> /* ... */
> do_something(null[long_type_name]);
> 
> Do I really have to type null[long_type_name]? Why can't I just type null?

Because you do :) 

Felix can only deduce types bottom up.

So to overload the function do_something the argument
type must be known, so you have to specify it.

Unlike C++ where there are automatic conversions.

To put this another way, Felix doesn't support polymorphic
constants. This is particularly annoying in typeclasses
where you'd want

(Continue reading)

Erick Tryzelaar | 9 Apr 06:19 2011
Picon

Re: cross compiling felix run time library

Oiy, so I got the build system to compile with the iphone target, but
I'm now thinking that this might not even work. The toolchain requires
running flx and flx_pkgconfig, which is currently built for the target
system, not the host. This means we can't actually run flx to compile
a binary for the phone :( So, this is going to take some more time
unfortunately.

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
john skaller | 9 Apr 09:09 2011
Picon
Picon

Re: cross compiling felix run time library


On 09/04/2011, at 2:19 PM, Erick Tryzelaar wrote:

> Oiy, so I got the build system to compile with the iphone target, but
> I'm now thinking that this might not even work. The toolchain requires
> running flx and flx_pkgconfig, which is currently built for the target
> system, not the host. This means we can't actually run flx to compile
> a binary for the phone :( So, this is going to take some more time
> unfortunately.

Yeah, these should be built to run on the host .. but they have to target
the target.

However RF can get away without any of these tools.. just use flxg
in a custom bash script.

We also need to think about supporting multiple targets. For example
a Mac user may want to build code for the Mac AND for an iPhone.
So probably we need

flx --target=iphone -c ....

Even better a way to run the code on the emulator..

--
john skaller
skaller@...

------------------------------------------------------------------------------
Xperia(TM) PLAY
(Continue reading)


Gmane