SDL implementation on LEON3 (sparc architecture)

Hello,
Please , I would like to find out if I could implement SDL on Sparc
architecture (Linux)?
Based on the SDL_platform.h file, it was said one has to define the
architecture which one is porting to. Done that, but but don’t seem to know
what to do next. Would appreciate some guidance.

I am doing the above, because I tried to make SDL libraries that would be
compatible with sparc-linux-gcc (a cross compiler), by using the commands
below:

./configure --host=sparc-linux CC=sparc-linux-gcc

(this was before I edited SDL_platform.h)

and everything was goin well, but then I got this error (had to do with
dmaaudio.c)

sparc-linux-gcc -g -O2 -I./include -D_GNU_SOURCE=1 -I/usr/include
-DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c
./src/audio/dma/SDL_dmaaudio.c -fPIC -DPIC -o build/.libs/SDL_dmaaudio.o
./src/audio/dma/SDL_dmaaudio.c: In function DMA_WaitAudio': ./src/audio/dma/SDL_dmaaudio.c:166: error: impossible constraint inasm’
make: *** [build/SDL_dmaaudio.lo] Error 1

Please, any ideas on how to proceed?

All I want is a to be able to compile the test example (SD|L_gears), so that
I’ll know I’m in bussiness.

It works fine with ‘gcc’ (thought I should mention this)

Thanks in advance

– Mike

It would be a bug in SDL’s configure step if this helps, but perhaps
look at disabling all of these options by hand:

donny at teamspace:~/SDL$ ./configure --help|grep -i assembl
–enable-assembly Enable assembly routines [default=yes]
–enable-mmx use MMX assembly routines [default=yes]
–enable-3dnow use MMX assembly routines [default=yes]
–enable-sse use SSE assembly routines [default=yes]
–enable-sse2 use SSE2 assembly routines [default=no]
–enable-altivec use Altivec assembly routines [default=yes]On Thu, Feb 19, 2009 at 4:24 AM, Mike Mike wrote:

./configure --host=sparc-linux CC=sparc-linux-gcc

sparc-linux-gcc -g -O2 -I./include -D_GNU_SOURCE=1 -I/usr/include
-DXTHREADS -D_REENTRANT -DHAVE_LINUX_VERSION_H -c
./src/audio/dma/SDL_dmaaudio.c -fPIC -DPIC -o build/.libs/SDL_dmaaudio.o
./src/audio/dma/SDL_dmaaudio.c: In function DMA_WaitAudio': ./src/audio/dma/SDL_dmaaudio.c:166: error: impossible constraint inasm’
make: *** [build/SDL_dmaaudio.lo] Error 1


http://codebad.com/

Did that, but still got the same output as before.
Now upon checking the config.log file. I found out that I’m having problems
with a conftest.c file.
Are these linked (asm in dmaaudio.c and contest)?
I get theses errors when I try to ‘make all’

Did some research on ‘conftest.c’, apparently it’s a source that gets
created temporary for testing purpose. So why then am I getting an error
relating to it.

To show specifically what I found in config.all

configure:3120: checking how to run the C preprocessor
configure:3160: sparc-linux-gcc -E conftest.c
configure:3166: $? = 0
configure:3197: sparc-linux-gcc -E conftest.c
conftest.c:9:28: ac_nonexistent.h: No such file or directory
configure:3203: $? = 1
configure: failed program was:
| /* confdefs.h. /
| #define PACKAGE_NAME “”
| #define PACKAGE_TARNAME “”
| #define PACKAGE_VERSION “”
| #define PACKAGE_STRING “”
| #define PACKAGE_BUGREPORT “”
| #define _GNU_SOURCE 1
| /
end confdefs.h. */
| #include <ac_nonexistent.h>
configure:3236: result: sparc-linux-gcc -E

Please, any idea on what might be causing this?

Thanks in advance.>

– Mike

And to add, when I did what you suggested;

./configure --help|grep -i assembl

I obtained this (which is different to what you had in your post)

–enable-assembly Enable assembly routines [default=yes]
–enable-nasm use nasm assembly blitters on x86 [default=yes]
–enable-altivec use altivec assembly blitters on PPC [default=yes]

they were only what I could disable

–MikeOn Sun, Feb 22, 2009 at 3:37 PM, Mike Mike <@Mike_Mike> wrote:

Did that, but still got the same output as before.
Now upon checking the config.log file. I found out that I’m having
problems with a conftest.c file.
Are these linked (asm in dmaaudio.c and contest)?
I get theses errors when I try to ‘make all’

Did some research on ‘conftest.c’, apparently it’s a source that gets
created temporary for testing purpose. So why then am I getting an error
relating to it.

To show specifically what I found in config.all

configure:3120: checking how to run the C preprocessor
configure:3160: sparc-linux-gcc -E conftest.c
configure:3166: $? = 0
configure:3197: sparc-linux-gcc -E conftest.c
conftest.c:9:28: ac_nonexistent.h: No such file or directory
configure:3203: $? = 1
configure: failed program was:
| /* confdefs.h. /
| #define PACKAGE_NAME “”
| #define PACKAGE_TARNAME “”
| #define PACKAGE_VERSION “”
| #define PACKAGE_STRING “”
| #define PACKAGE_BUGREPORT “”
| #define _GNU_SOURCE 1
| /
end confdefs.h. */
| #include <ac_nonexistent.h>
configure:3236: result: sparc-linux-gcc -E

Please, any idea on what might be causing this?

Thanks in advance.

– Mike

What version of SDL are you trying to build?On Sun, Feb 22, 2009 at 10:53 AM, Mike Mike wrote:

I obtained this (which is different to what you had in your post)

–enable-assembly Enable assembly routines [default=yes]
–enable-nasm use nasm assembly blitters on x86 [default=yes]
–enable-altivec use altivec assembly blitters on PPC [default=yes]

they were only what I could disable


http://codebad.com/

The version I have is SDL-1.2.13

I’m trying to cross-compile from i386 (or 686) to sparc-linux

Hope this answers your question.> – Mike

Ah yes, I was speaking from a perspective of SDL 1.3 when I told you
which architecture-dependent options to switch off.On Sun, Feb 22, 2009 at 1:07 PM, Mike Mike wrote:

The version I have is SDL-1.2.13

I’m trying to cross-compile from i386 (or 686) to sparc-linux

Hope this answers your question.


http://codebad.com/

Ah ok. So, would you say you know what’s wrong?
And, what other files or libraries do you think I would need if I want to
cross-compile to LEON Architecture (Sparc)?>

Thanks in advance

– Mike

Hello,
Please , I would like to find out if I could implement SDL on Sparc
architecture (Linux)?

Try SDL 1.3:
http://www.libsdl.org/tmp/SDL-1.3.tar.gz

See ya,
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC

Guys,
I have an enquiry to make, regarding SDLgears.

I’m trying to cross-compile this program to run on another architecture.
So far, I have the source code and any other sources I need (for SDLgears)

But, when I passed this command
’ldd SDLgears’
to bash, I get a list of shared libraries (shown below).

$ ldd SDLgears
linux-gate.so.1 => (0x0042c000)
libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0x004e6000)
libGL.so.1 => /usr/lib/libGL.so.1 (0x00471000)
libc.so.6 => /lib/libc.so.6 (0x00101000)
libm.so.6 => /lib/libm.so.6 (0x00dd2000)
libdl.so.2 => /lib/libdl.so.2 (0x0026c000)
libpthread.so.0 => /lib/libpthread.so.0 (0x00273000)
libX11.so.6 => /usr/lib/libX11.so.6 (0x052e0000)
libXext.so.6 => /usr/lib/libXext.so.6 (0x053e3000)
libXxf86vm.so.1 => /usr/lib/libXxf86vm.so.1 (0x00610000)
libXdamage.so.1 => /usr/lib/libXdamage.so.1 (0x00773000)
libXfixes.so.3 => /usr/lib/libXfixes.so.3 (0x05726000)
libdrm.so.2 => /usr/lib/libdrm.so.2 (0x0040b000)
/lib/ld-linux.so.2 (0x002d9000)
libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x002b1000)
libxcb.so.1 => /usr/lib/libxcb.so.1 (0x002b5000)
libXau.so.6 => /usr/lib/libXau.so.6 (0x002ac000)
libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x002a4000)

My question is, ‘Are these the libraries SDLgears need, so it could run?’

I’m saying this because, if they are the libraries it needs, would that mean
I have to cross-compile them all to Sparc version, right?

All Suggestions, welcomed

Thanks in advance.

– Mike>

My question is, ‘Are these the libraries SDLgears need, so it could run?’

It’s all the libraries that SDLgears needs to run on this system,
directly or indirectly.

I’m saying this because, if they are the libraries it needs, would that mean
I have to cross-compile them all to Sparc version, right?

Many of those will be provided by the target system, such as the
libpthread, and quite importantly (because it probably has
hardware-specific bits in it), libGL. Many of those libraries are
dependencies of libX11 or libGL, which are themselves pulled in by
libSDL.

Ideally, all those (except possibly libSDL) are included in the
cross-compiler kit. If not, then it gets tricky…On Tue, Mar 10, 2009 at 6:21 AM, Mike Mike wrote:


http://pphaneuf.livejournal.com/

To elaborate on what Pierre said:

??? libc.so.6 => /lib/libc.so.6 (0x00101000)
This one is the C standard library

??? libm.so.6 => /lib/libm.so.6 (0x00dd2000)
This one contains math functinos

??? libdl.so.2 => /lib/libdl.so.2 (0x0026c000)
This is part of the dynamic linker

You can see how probably all of these libs are things that will be
available on your target system already, unless you’re doing something
really exotic.–
http://codebad.com/