[ARMedslack] Compiling mame fro ARM

Davide louigi600 at yahoo.it
Fri Oct 21 13:12:41 UTC 2011


This got my build working on AC100:

diff -ur xmame-0.106/makefile.unix xmame-0.106-arm/makefile.unix

--- xmame-0.106/makefile.unix   2011-10-14 16:15:49.091527532 +0200
+++ xmame-0.106-arm/makefile.unix       2011-10-21 18:20:32.000000000 +0200
@@ -126,8 +126,9 @@
 # this section.
 ###########################################################################
 
-# GCC on x86
-CFLAGS = -O2
+# GCC on ARM LSB
+CFLAGS = -O2 -mlittle-endian -mwords-little-endian
+
 
 # GCC on x86 with some optimizations
 # CFLAGS = -O2 -mtune=i686 -fomit-frame-pointer -fstrength-reduce -ffast-math
@@ -181,7 +182,7 @@
   #########################################################################
   
   # Check for C89 + GNU extensions compliance.
-  CFLAGS += -std=gnu89
+#  CFLAGS += -std=gnu89
 
   # Show all warnings.
   CFLAGS += -Wall
@@ -224,7 +225,7 @@
   # debugging.
   # CFLAGS += -O2
   # CFLAGS += -O1
-  # CFLAGS += -O3
+  CFLAGS += -O2
   # CFLAGS += -Os
   # CFLAGS += -O0
 
@@ -328,7 +329,7 @@
 ifeq ($(CC),icc)
 
   # Optimizations for the Intel compiler.
-  CFLAGS    = -O3 -rcd -Xa -ipo -ipo_obj
+#  CFLAGS    = -O3 -rcd -Xa -ipo -ipo_obj
 
 else
 ifeq ($(CC),sun-forte)
@@ -576,7 +577,7 @@
 ###########################################################################
 
 # i386, GNU asm
-MY_CPU = i386
+MY_CPU = arm
 
 # i386, no asm -- needed for the Intel C++ compiler, which does not fully
 # understand GCC's inline assembly syntax, though you may still enable

diff -ur xmame-0.106/src/unix/unix.mak xmame-0.106-arm/src/unix/unix.mak
--- xmame-0.106/src/unix/unix.mak       2006-05-26 06:52:07.000000000 +0200
+++ xmame-0.106-arm/src/unix/unix.mak   2011-10-21 18:19:57.000000000 +0200
@@ -18,6 +18,7 @@
 CFLAGS.risc_lsb   = -DALIGN_INTS -DALIGN_SHORTS -DLSB_FIRST
 CFLAGS.mips       = -DALIGN_INTS -DALIGN_SHORTS -DSGI_FIX_MWA_NOP
 CFLAGS.bfin       = -DLSB_FIRST -DALIGN_INTS -DALIGN_SHORTS
+CFLAGS.arm        = -DALIGN_INTS -DALIGN_SHORTS -DLSB_FIRST
 
 ##############################################################################
 # Architecture-dependent settings




________________________________
Da: Davide <louigi600 at yahoo.it>
A: Slackware ARM port <armedslack at lists.armedslack.org>
Inviato: Giovedì 20 Ottobre 2011 16:04
Oggetto: [ARMedslack] Compiling mame fro ARM


Way back in 2006 I had a working xmame for my Z that even if a little slowly it worked.

Since then xmame has been dropped and original mame now builds on unix.
I've built mame0143 on my x86 linux pc but I've had no luck on ARM.

The old xmame sources build but produce a binary that complains about endianness while I was unable to compile normal mame on ARM.
I tryed fiddling with CFLAGS to force little endian but it did no better.
I've totally forgotten whatever I did way back in 2006. Anyone have any idea ?

Regards
David 

_______________________________________________
ARMedslack mailing list
ARMedslack at lists.armedslack.org
http://lists.armedslack.org/mailman/listinfo/armedslack
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.armedslack.org/pipermail/armedslack/attachments/20111021/dce6f7af/attachment-0001.html>


More information about the ARMedslack mailing list