Insert Coin P1
Posts: 1
Joined: Mon Sep 17, 2012 2:33 am

Unrecognized command line option '-m32'

Mon Sep 17, 2012 2:53 am

So, I've created a nice cross compiler as outlined in: ... pberry-pi/
I'm trying to compile a program, namely the most current version of mame (MAME 0.146) from . I compiled it naively on my dev box, so I know the source works, and I have all of the libraries. I changed the makefile CC reference to the name of my compiler. Once I run 'make,' the folders are created, and the first compile is run, but I get an error:
mkdir -p obj/sdl/mame/video
mkdir -p obj/sdl/osd
mkdir -p obj/sdl/osd/sdl
mkdir -p obj/sdl/tools
Compiling src/emu/cpu/m68000/m68kmake.c...
arm-unknown-linux-gnueabi-gcc -DCRLF=2 -DINLINE="static inline" -DLSB_FIRST -DNDEBUG -DFLAC__NO_DLL -DSDLMAME_SDL2=0 -DDISTRO=generic "-DSDLMAME_ARCH=" -DSYNC_IMPLEMENTATION=tc -DSDLMAME_UNIX -DUSE_OPENGL=1 -DUSE_DISPATCH_GL=1 -DSDLMAME_X11 -DNATIVE_DRC=drcbe_x86 -pipe -O3 -Werror -fno-strict-aliasing -Wall -Wcast-align -Wundef -Wformat-security -Wwrite-strings -Wno-sign-compare -Wno-conversion `sdl-config --cflags | sed -e 's:/SDL[2]*::' -e 's:\(-I[^ ]*\)::g'` -m32 `pkg-config --cflags-only-other gtk+-2.0` `pkg-config --cflags-only-other gconf-2.0` -Isrc/mame -Iobj/sdl/mame/layout -Isrc/emu -Iobj/sdl/emu -Iobj/sdl/emu/layout -Isrc/lib/util -Isrc/lib -Isrc/osd -Isrc/osd/sdl -Isrc/lib/expat -Isrc/lib/zlib -Isrc/lib/util -Isrc/lib/libjpeg -Isrc/debug -include src/osd/sdl/sdlprefix.h `sdl-config --cflags | sed -e 's:/SDL[2]*::' -e 's:\(-D[^ ]*\)::g'` `pkg-config --cflags fontconfig` `pkg-config --cflags-only-I gtk+-2.0` `pkg-config --cflags-only-I gconf-2.0` -I/usr/X11/include -I/usr/X11R6/include -I/usr/openwin/include -x c++ -std=gnu++98 -Woverloaded-virtual -Iobj/sdl/emu/cpu/m68000 -c src/emu/cpu/m68000/m68kmake.c -o obj/sdl/emu/cpu/m68000/m68kmake.o
cc1plus: error: unrecognized command line option '-m32'
make: *** [obj/sdl/emu/cpu/m68000/m68kmake.o] Error 1

I imagine that this is a parameter that is getting passed to the compiler, but I'm not sure how to work about it. Does anyone have any clues? Furthermore, is there any formula I should be using to convert the makefile? I have the feeling that I should be changing more than the CC reference.

Thanks in advance.

Posts: 14
Joined: Fri Jul 27, 2012 3:05 pm

Re: Unrecognized command line option '-m32'

Tue Sep 18, 2012 7:59 am

-m32 tells the compiler to use and create 32bit objects, in contrast to -m64 which would use/compile 64bit objects, and since the Pis ARM CPU only supports 32bit mode both flags were left out.
I'm afraid you will just have to go through the Makefiles and remove any mention of the -m32 flag and hope for the best. ;)

Code: Select all

grep -R "\-m32" .
should tell you where the flag was used and then you can just remove it.

Return to “C/C++”