Universal Binaries for Mac OS
Universal Binaries for Mac OS
I'd like a Feature to build Universal Binaries which would work on x86 and PowerPC based Mac.
You can already create universal binaries from PB. Just compile your code once with the x86 and once with the ppc version and then use the "lipo" commandline tool to combine the two executables into one universal binary.
There is also a tool here, never tested it though: http://www.purebasic.fr/english/viewtopic.php?t=36678
I don't think adding a direct IDE option for this is such a good idea because the x86 and ppc compilers have some differences (no quad or double support on ppc, also there is a limit on procedure parameters). If people just blindly select "universal binary" as output and never test the ppc side of that binary, they will most likely end up with a broken program on ppc Macs.
So better compile the ppc version separately and also test it separately (can be done with Rosetta), and only combine them to a universal binary once you know they both work as expected.
There is also a tool here, never tested it though: http://www.purebasic.fr/english/viewtopic.php?t=36678
I don't think adding a direct IDE option for this is such a good idea because the x86 and ppc compilers have some differences (no quad or double support on ppc, also there is a limit on procedure parameters). If people just blindly select "universal binary" as output and never test the ppc side of that binary, they will most likely end up with a broken program on ppc Macs.
So better compile the ppc version separately and also test it separately (can be done with Rosetta), and only combine them to a universal binary once you know they both work as expected.
quidquid Latine dictum sit altum videtur
Re: Universal Binaries for Mac OS
Why is there a compile option for "Any CPU" if it doesn't compile for Intel and ARM? Is this a prep thing?
Re: Universal Binaries for Mac OS
For Any Intel CPU (SSE, etc) for user libraries ...
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
Re: Universal Binaries for Mac OS
Before asking in the forum, you should read the help:tikidays wrote: Sun Jan 28, 2024 6:16 pm Why is there a compile option for "Any CPU" if it doesn't compile for Intel and ARM? Is this a prep thing?
https://www.purebasic.com/documentation ... piler.htmlCpu Optimisation (next to Executable format)
This setting allows to include Cpu optimised PB functions in your executable:
All CPU : The generic functions are included that run on all CPUs.
Dynamic CPU : The generic functions as well as any available CPU specific function are included. The function to execute is decided at runtime. This creates a bigger executable, but it will run as fast as possible on all CPUs.
All other options : Include only the functions for a specific CPU. The executable will not run on any Cpu that does not support this feature.
Note: No PB functions actually support this feature for now (it is ignored for them). However, some User Libraries include such optimisations.
Good morning, that's a nice tnetennba!
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD
PureBasic 6.21/Windows 11 x64/Ryzen 7900X/32GB RAM/3TB SSD
Synology DS1821+/DX517, 130.9TB+50.8TB+2TB SSD