Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2011-11

Cross compile Linux-N9 (arm-linux)

5 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Joost van der Sluis

Hi all,

I successfully cross-compiled 'Hello World' for my new Nokia N9. the N9 uses a Linux version. (Called Maemo-6 or Meego-Harmattan, depending on who you ask)

But when I try to link to libc, (for example by adding the cwstrings unit) the application crashes at startup (in _dl_init, called from ld-linux.so)

Most probably because a invalid entry point, the linker gives the following error:

Linking hello
/home/CNOC/joost/QtSDK/Madde/toolchains/arm-2009q3-67-arm-none-linux-gnueabi-x86_64-unknown-linux-gnu/arm-2009q3-67/bin/arm-none-linux-gnueabi-ld: warning: cannot find entry symbol cs=/home/CNOC/joost/QtSDK/Madde/targets/harmattan_10.2011.34-1/specs; defaulting to 0000000000008484 11 lines compiled, 0.2 sec

As you can see I use the toolchain (ld, as and libraries/so-files) from the toolchain from the Nokia-sdk. I don't know what that specs file is for, but it contains the following:

=======
%rename cc1 old_cc1

*cc1:
-march=armv7-a -mcpu=cortex-a8 -mfpu=vfp -mfloat-abi=hard -fno-omit-frame-pointer -fno-optimize-sibling-calls %(old_cc1)

%rename link old_link

*link:
-O 1 --hash-style=gnu -L=/usr/lib/gcc/arm-linux-gnueabi/4.4 %(old_link) =======

Any idea how to proceed?

Joost.

Reply by email

Joost van der Sluis
to Joost van der Sluis
Joost van der Sluis wrote
But when I try to link to libc, (for example by adding the cwstrings unit) the application crashes at startup (in _dl_init, called from ld-linux.so)

Never mind, I've found the problem. The linker that I used was actually a wrapper, which called another linker with some extra options. Those options aren't applicable to Free Pascal.

Now it run.

Joost.

Reply by email

Felipe Monteiro de Carvalho
to Joost van der Sluis
Joost van der Sluis wrote
This is really nice, I can just run LCL (qt) applications on that phone. Almost as easy as with WinCE. Joost. (Who is really happy with his new phone)

The sad part is that the platform was abandoned by Nokia and now is no longer supported by any significant smartphones manufacturer. Buying a N9 was in my plans, but I gave up when Nokia went to the dark side of the force.

I am working hard on LCL-CustomDrawn so hopefully in the not so distant future LCL apps will support Android too very reliably. Actually will support almost anything since the porting requirements will be so dramatically reduced in comparison to now.

Felipe Monteiro de Carvalho

Reply by email

Joost van der Sluis
to Felipe Monteiro de Carvalho
Felipe Monteiro de Carvalho wrote 10 lines
On Mon, Nov 21, 2011 at 6:45 PM, Joost van der Sluis wrote: > This is really nice, I can just run LCL (qt) applications on that phone. > Almost as easy as with WinCE. > > Joost. (Who is really happy with his new phone) The sad part is that the platform was abandoned by Nokia and now is no longer supported by any significant smartphones manufacturer. Buying a N9 was in my plans, but I gave up when Nokia went to the dark side of the force.

I don't care what Nokia does, I bought the N9 just out of fun. And fun it is.

I am working hard on LCL-CustomDrawn so hopefully in the not so distant future LCL apps will support Android too very reliably. Actually will support almost anything since the porting requirements will be so dramatically reduced in comparison to now.

Working with Android may be interesting for commercial reasons, but fpc is also my hobby, and then Android is not interesting at all..

Joost.

Reply by email