I want to compile a customized Apache module for OHS on Solaris 64bit SPARC machine. It is a Apache C code. But what I have is only Windows machine and Linux VMs. Can this achieved using Oracle developer studio IDE. Or is there any other way? Please help
1 Answers
You can use QEMU and run a SPARC virtual machine under emulation:
Status
The table below gives the status of the SPARC machines available in QEMU and is correct as of the latest release:
Machine Status sun4m Complete, supported sun4u Beta, supported sun4v Incomplete, unsupported niagara Complete, supported
Pay particular attention to the exact architecture you need to compile for. You should be able to run Oracle Developer Studio on the emulated system. You may have to use an older SPARC architecture to generate binaries runnable on your target systems. For example, you might want to use something like -xarch=sparcv9
.
Note that the emulated system will be S-L-O-W. Large compiles can take hours or even days. You should probably develop your Solaris-specific code on an x86 VM, and only do the final SPARC compile on the emulated system. Just be aware that you can get away with strict aliasing and alignment violations on x86 systems that will throw a SIGBUS
on SPARC systems.

- 32,625
- 3
- 24
- 56
-
Not able to install Solaris 11 with QEMU, But cross compiled the code using gcc on Linux, thanks – Vinod Marathe Jul 24 '19 at 11:39
-
@VinodMarathe *But cross compiled the code using gcc on Linux* I'd say you deserve bonus points for that. – Andrew Henle Jul 24 '19 at 11:43