OpenSSL for AMD/Intel

Print E-mail
Wednesday, 17 November 2010 14:18

While we were updating the OpenSSL software on our production systems, we came across the problem of using different CPU architectures for build versus that for production. After an hour or so of tinkering and searching the web, we managed to build OpenSSL in a generic fashion, so it works on both AMD and Intel chips.

The process of building the OpenSSL software on Solaris was complicated by the fact our production systems are Intel Xeon based, while the build platform is AMD based. As such, the process was harder than it should have been. To overcome the problem of the compiler using CPU features that were not present on the other platform, you need to edit the 'Configure' script and remove the '-fast' option for solaris-x86-cc, replacing it with '-fns -fsimple=2 -fsin
gle -nofstore -xalias_level=basic -xbuiltin=%all -xdepend -xlibmil -xO5 -xregs=frameptr -xtarget=generic -xarch=sse2'.

The -fast option expands to use -xtarget=native, which means use the features of the local CPU, which is where the problem starts. Changing that to -xtarget=generic removes the problem; the other items are those that would normally be set by using -fast.

 
Frost on fence posts
Donate to help fund our open source software and articles.



Valid XHTML 1.0 Transitional
Valid CSS!