compile 32bit programs with 64bit linux?

Archives Forums/Linux Discussion/compile 32bit programs with 64bit linux?

Perturbatio(Posted 2005) [#1]
Can anyone suggest a relatively easy way to compile BMax apps so that they will run under 32bit linux?


N(Posted 2005) [#2]
Don't use a 64 bit operating system.


Perturbatio(Posted 2005) [#3]
From what I have found, GCC supports compiling to 32bit by passing -m32 as a commandline parameter.


Robert(Posted 2005) [#4]
Once mark makes the BMK source available, we'll be able to do this for ourselves :)

Just out of interest, can you test whether the BlitzMAX compiler produces 64bit code under Linux or whether it always produces 32bit code (ie. What is sizeof(<integer variable>) under 64bit Linux?)


Perturbatio(Posted 2005) [#5]
AFAIK it produces 64bit since GCC does by default, I'll try rebooting into linux in a moment and test it.


skidracer(Posted 2005) [#6]
bmk has a verbose option if you want to see what it's calling


Perturbatio(Posted 2005) [#7]
hmmm...
g++ -m32 -s -Os --eh-frame-hdr -pthread -o testb -L/home/kris/BlitzMaxCore106/lib -L/usr/X11R6/lib/home/kris/BlitzMaxCore106/tmp/ld.tmp


it appears to already be using -m32 but I tried running an app on a friends 32bit machine and it didn't run.
*might* be his config.
Anyone with 32bit linux care to test an app?


Perturbatio(Posted 2005) [#8]
no-one then?