Cross compiling SDL for ARM

Hi All,

I need to cross compile SDL-1.2.11 for my target=ARM.

I have ARM Tool chain available with me in my host=x86(Linux FC 3).

1)I have set PATH, where arm cross compiler (arm_v5_gcc)[I’m not sure about the correct compiler name] is located.
$ export PATH = /ARM/…/bin:$PATH

2)after that I have done.
$ ./configure --prefix=$PREFIX --host=arm-elf
$ make
$ make install;

but the .so’s which I got are not for ARM (it’s still showing for Intel
x86…).

can anyone tell me where I’m missing or whether I have to do some
modification in SDL source code to cross compile it for ARM.

Regards,
Prasanna.

1)I have set PATH, where arm cross compiler (arm_v5_gcc)[I’m not sure about the correct compiler name] is located.
$ export PATH = /ARM/…/bin:$PATH

export CC=nameofcrossgcc
export CXX=nameofcrossg++ifneeded

See ya,
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment

You also have to set the options for ./configure … --host=arm_v5 or
the correct architecture name. For me --host=armv5l-linux works fine. I
am using a timesys-arm toolchain: armlv5l-linux-gcc, armlv5l-linux-g++,
armlv5l-linux-as, armlv5l-linux-… As well specify a different
output-path with --prefix=… becouse make install try to install the
arm SDL library in the default directory /usr/local overwriting your x86
library!!

cu
Matthias Zacharias

Sam Lantinga 28.6.2007 06:41 >>>
1)I have set PATH, where arm cross compiler (arm_v5_gcc)[I’m not sure about the correct compiler name] is located.
$ export PATH = /ARM/…/bin:$PATH

export CC=nameofcrossgcc
export CXX=nameofcrossg++ifneeded

See ya,
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment_______________________________________________
SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org


Besuchen Sie uns auf der PRODUCTRONICA
vom 13. bis 16. Nov. 2007 in M?nchen
Halle 6, Stand 209


BMK electronic solutions GmbH
Werner-von-Siemens-Str. 6, Eingang 18 f
D-86159 Augsburg
Tel. +49 (0) 821 / 207 88 - 700
Fax +49 (0) 821 / 207 88 - 721
info at bmk-solutions.de
Gesch?ftsf?hrer: Dipl.-oec. Alois Kn?ferle
Sitz: Augsburg
HR-Nr.: B21197

Diese E-mail kann vertrauliche Informationen enthalten. Falls Sie diese
E-Mail irrt?mlich erhalten haben, informieren Sie bitte unverz?glich den
Absender und l?schen Sie diese E-Mail von jedem Rechner, auch von den
Mailservern. Jede Verbreitung des Inhalts, auch die teilweise
Verbreitung, ist in diesem Fall untersagt. Au?er bei Vorsatz oder grober
Fahrl?ssigkeit schliessen wir jegliche Haftung f?r Verluste oder Sch?den
aus, die durch Viren befallene Software oder E-Mails verursacht werden.

This e-mail may contain confidential information. If you received this
e-mail in error, please contact the sender and delete this e-mail from
your computer, including your mailservers. Any dissemination, even
partly, is prohibited. Except in case of gross negligence or wilful
misconduct we accept no liability for any loss or damage caused by
software or e-mail viruses.

Thanks alot …

I’m now able to cross-compile my SDL for ARM.
After that I cross-compiled SDL_image and SDL_mixer also.

and copied all these into the ARM filesystem.

Now I want to run some SDL games.

As in x86 while configuring it is asking for --host option and it is not
taking --host=arm.
So I have directly copied the source file in the ARM filesystem and tried to
build it.
but all of the games are giving me error: SDL_image.h, No such file or
directory.

I know I’m missing somewhere in setting an include path. Either in some
source code or in the Makefile.

Any idea…

Regards,
Prasanna> ----- Original Message -----

From: Sam Lantinga [mailto:slouken@seras.devolution.com]On Behalf Of Sam
Lantinga
Sent: Thursday, June 28, 2007 10:11 AM
To: Prasanna Kumar K; A list for developers using the SDL library.
(includes SDL-announce)
Subject: Re: [SDL] Cross compiling SDL for ARM

1)I have set PATH, where arm cross compiler (arm_v5_gcc)[I’m not sure about the correct compiler name] is located.
$ export PATH = /ARM/…/bin:$PATH

export CC=nameofcrossgcc
export CXX=nameofcrossg++ifneeded

See ya,
-Sam Lantinga, Lead Software Engineer, Blizzard Entertainment