On Apr 22, 2006, at 4:32 AM, rohit dhamija wrote:
Please guide me to correct mailing list incase I am putting the question on wrong one.
We are building a failry large product comprising of
Framework - device driver for communicating to usb bulk device
Static and dynamic libraries - communicating with the framework and user application
JNI's - communicating with the C libraries and JAVA Toolkit
Java toolkit - user interface
Need to support for
Mac OS 10.4 powerpc
Mac OS 10.4 Intel
and on hardware comprising for G4, G5 and Intel core duo
Currently, the application is developed as 32-bit but need to support for 64-bit too.
Why does it need to support 64 bit? Does it really need a virtual space that large? Or do you just want 64 integer math support?
Q1) Currently, I have tested the app for G4 and Intel based mac's. Will the same application work the
same on G5 machine ? Or there may be some issues ?
Mac OS X on G5 supports 32 bit applications and 64 bit applications (the later limited to only command line applications). I see no reason you binary shouldn't just work... unless you have compiled your PowerPC binary to use instructions specific to the G4 (doubt you did that). The G5 runs 32b application just fine.
What do mean by "directly"?
Q3) Do we need to ship different libraries and framework for 32 bit and 64 bit seperately ?
Mac OS X kernel is always work in a 32 bit virtual address space (at least for 10.4 and before, not sure what 10.5 will bring) and the DART on the G5 handles greater then 32 bit physical address mappings for you so you also only work with 32 bit physical addresses for DMA (just make sure to use the proper IOKit memory prepare functions).
Q4) http://developer.apple.com/macosx/64bit.html says to change the architecture settings to ppc ppc64 in order to support 32 and 64-bit application. We are are building Universal binaries, Can universal binary support 64-bit application ?
If you define ppc64 the binary you produce will only run on G5 systems and will get a 64 bit address space assuming it only uses libSystem (also can use the accelerate framework). The technology behind Universal binaries supports having ppc, ppc64, i386 (and more) architectures in a single binary.
Any pointers suggestions to support 32bit app to support 64-bit are most welcome
Make sure to review the following...
...and make sure you really need to provide 64 bit support and exactly what type of support you really need. Note that Apple has not yet defined its 64 bit plans for Intel so whatever you do for the G5 may not be valid (or needed) once Apple outlines their 64 bit plans for Intel. Personally I wouldn't bother working on supporting 64 bit on G5 given the unknowns regarding future 64 bit support on Intel and the fact that the G5 is on its way out (granted many G5 systems exist and will continue to exist in the wild...).