FrozenSand / ioq3-for-UrbanTerror-4

The officially supported ioquake3 engine by the Frozen Sand Development Team for the game Urban Terror 4.x
http://www.urbanterror.info
GNU General Public License v2.0
148 stars 65 forks source link

64bit for Mac OS X #52

Closed ThomasBrierley closed 8 years ago

ThomasBrierley commented 8 years ago

I found the CPU to be a major bottleneck with the 32bit binary, compiling for 64bit made a big difference for me. I've been using this for over a year so it's well tested, tidied up and rebased.

I found maintaining 32bit compatibility with binary stitching tricky, so this just replaces the 32bit parts, hopefully no one is still using any of the early 32bit intel macs still. This also allowed me to add some better optimisation flags as core2 is the most basic 64bit mac arch.

ThomasBrierley commented 8 years ago

OpenBSD PR beat me to the register prefix fix :D rebased again and rebuilt, all good.

Barbatos commented 8 years ago

Thank you Thomas.

We're still targeting down to OSX 10.5 and I'm not 100% sure it fully supports x86_64. I'll have a look next week on my OSX 10.5 and OSX 10.11 macbooks.

ThomasBrierley commented 8 years ago

The Makefile still points at OS X 10.5 libraries so it will still be the minimum. Although 10.5 doesn't run the kernel in 64bit mode it does supports 64bit binaries provided the CPU is capable, 10.5 was the only version that traversed 32bit to 64bit x86 so users with that OS could have either CPU.

ThomasBrierley commented 8 years ago

If you think 32bit support is still important I suppose I could make separate binaries like the Linux ones, making a universal binary was messy though.

Barbatos commented 8 years ago

I'll have a look on my old 10.5 machine next week and see how it goes.

Barbatos commented 8 years ago

Everything works fine for me on OSX 10.10 and OSX 10.11. I thought I still had 10.5 somewhere but I don't so I can't test on this version. I still have an old macbook with OSX 10.6 but it's not 64bit capable as it has a 32bit firmware (EFI32). It should work fine on a OSX 10.6 machine with a 64bit firmware though.

Thank you Thomas! :+1:

ThomasBrierley commented 8 years ago

Great :) I've been using it on 10.6.8 with the kernel in 64bit mode so it will definitely work on that.

I seem to remember in 10.5 and 10.6 the 32bit kernels were capable of running 64bit binaries, so if you have 32bit EFI but a 64bit CPU it should still work. Did you attempt to run it on your 10.6 machine?

Barbatos commented 8 years ago

Yep I tried several things but I was never able to run it on OSX 10.6 with a 32bit kernel. I'm not too concerned if it works fine on 10.6.8 with a 64bit kernel. :+1: