Make 64-bit compiler executable 32-bit?

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Make 64-bit compiler executable 32-bit?

Post by Lunasole »

Hi, recently I've encountered with problem -- sitting on 32-bit system was unable to compile 64-bit executables. Without access to 64 bit PC I had to quickly search someone who will compile it remotely ^^

After that thinked it would be nice to keep compiler exe always 32-bit for compatibility.
I don't know is it possible with PB and how much efforts might take, but it looks like a good idea. VC for example compiles both 64 and 32 bit files using 32-bit compiler, and that matters if having to build something on older or just 32-bit OS.

Maybe it would be even simpler to develop only 32-bit compiler? Also, as for me 64-bit is generally useless, as it only takes more RAM, without noticeable performance bonus on any modern CPU (2012+) and it doesn't seems that PB compiler [which is nicely coded and relatively simple/single-pass] can ever require more than 2GB of RAM granted for 32-bit process
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
skywalk
Addict
Addict
Posts: 4211
Joined: Wed Dec 23, 2009 10:14 pm
Location: Boston, MA

Re: Make 64-bit compiler executable 32-bit?

Post by skywalk »

Actually, I struggle to find x86 pc's today. They are heading to the 16-bit pc closet.
The nice thing about standards is there are so many to choose from. ~ Andrew Tanenbaum
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Make 64-bit compiler executable 32-bit?

Post by Lunasole »

skywalk wrote:Actually, I struggle to find x86 pc's today. They are heading to the 16-bit pc closet.
I still have one old machine in addition to main, and many ppl I know having notebooks with Windows XP 32-bit, etc [because those notebooks getting slow and shitty if you put Vista or Seven on them]. At least for few years more systems with 32-bit only will remain, as for me. Also, on virtual machines typically 32-bit OS are used and that's prevents from compiling 64-bit on them with PB.

But well in USA it should be really rare case, unlike China and others.
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
User avatar
ar-s
Enthusiast
Enthusiast
Posts: 344
Joined: Sat Oct 06, 2007 11:20 pm
Location: France

Re: Make 64-bit compiler executable 32-bit?

Post by ar-s »

I think you can't... A 64bits app can't be execute in a 32 bits machine so i don't see how the x64 compiler could be used with an x86..
the best way is to install PB x64 and x86 on your 64bits machine then make 2 versions of your codes
You will be able to compil for both systems with the same IDE.
~Ar-S~
My Image Hoster for PB users
My webSite (french) with PB apps : LDVMULTIMEDIA
PB - 3.x / 5.7x / 6 - W11 x64 - Ryzen 7 3700x / #Rpi4

Code: Select all

r3p347 : 7ry : un71l d0n3 = 1
infratec
Always Here
Always Here
Posts: 7588
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: Make 64-bit compiler executable 32-bit?

Post by infratec »

Under special circumstances VirtualBox can run a 64bit OS on a 32bit host.
You can try this.

Look also here:
http://askubuntu.com/questions/180761/c ... 2-bit-host

Then you can use PB x64 inside for compilation.

Bernd
User avatar
Lunasole
Addict
Addict
Posts: 1091
Joined: Mon Oct 26, 2015 2:55 am
Location: UA
Contact:

Re: Make 64-bit compiler executable 32-bit?

Post by Lunasole »

ar-s wrote:I think you can't... A 64bits app can't be execute in a 32 bits machine so i don't see how the x64 compiler could be used with an x86..
It can't be executed/debugged, but can be compiled (if 64-bit compiler executable will be 32-bit).

infratec wrote:Under special circumstances VirtualBox can run a 64bit OS on a 32bit host.
You can try this.

Look also here:
http://askubuntu.com/questions/180761/c ... 2-bit-host

Then you can use PB x64 inside for compilation.

Bernd
Interesting, I didn't seen such abitility earlier. However it's not a solutionl because you simple can't run Virtual box on 32-bit PC (which HW is often too weak to emulate something without stuff like AMD-V implemented in CPU)
"W̷i̷s̷h̷i̷n̷g o̷n a s̷t̷a̷r"
Post Reply