简体   繁体   English

如何从Linux / Windows编译目标Solaris 64位SPARC的C / CPP代码

[英]How to compile c/cpp code for target Solaris 64bit SPARC from linux/windows

I want to compile a customized Apache module for OHS on Solaris 64bit SPARC machine. 我想在Solaris 64位SPARC计算机上为OHS编译自定义的Apache模块。 It is a Apache C code. 它是Apache C代码。 But what I have is only Windows machine and Linux VMs. 但是我只有Windows机器和Linux VM。 Can this achieved using Oracle developer studio IDE. 使用Oracle Developer Studio IDE是否可以实现这一目标。 Or is there any other way? 还是还有其他方法? Please help 请帮忙

You can use QEMU and run a SPARC virtual machine under emulation: 可以使用QEMU并在仿真下运行SPARC虚拟机:

Status 状态

The table below gives the status of the SPARC machines available in QEMU and is correct as of the latest release: 下表列出了QEMU中可用的SPARC计算机的状态,并且在最新版本中是正确的:

 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. 您应该能够在仿真系统上运行Oracle Developer Studio。 You may have to use an older SPARC architecture to generate binaries runnable on your target systems. 您可能必须使用较旧的SPARC体系结构来生成可在目标系统上运行的二进制文件。 For example, you might want to use something like -xarch=sparcv9 . 例如,您可能想使用-xarch=sparcv9类的东西。

Note that the emulated system will be SLOW . 请注意,仿真系统将为SLOW 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. 您可能应该在x86 VM上开发特定于Solaris的代码,并且仅在仿真系统上进行最终的SPARC编译。 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. 只是要知道,您SIGBUS在x86系统上使用严格的别名和对齐冲突,而这会在SPARC系统上抛出SIGBUS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM