Opened 14 years ago
Closed 14 years ago
#2773 closed Bugs (fixed)
Sun toolset uses -fast by default
Reported by: | Owned by: | Vladimir Prus | |
---|---|---|---|
Milestone: | Boost 1.39.0 | Component: | build |
Version: | Boost 1.37.0 | Severity: | Problem |
Keywords: | Cc: |
Description
With --toolset=sun, -fast is enabled by default.
The -fast option of the Sun CC enables optimized codegen for all the hardware features, which are available for the CPU, where the CC process is currently running.
For example if you compile with -fast on an Solaris/Opteron systems, you code very likely will contain 3dnow-instruction. If you want to share the binaries with Solaris/Intel-Xeon-64-bit systems you have a problem.
Thus, I suggest a default optimization level of '-O' for the Sun CC (e.g. with --toolset=sun). Or '-xOsomething' if you will.
The situation is comparable to using -O or -O2 with gcc, and not -march=native.
Change History (4)
comment:1 by , 14 years ago
Component: | None → build |
---|---|
Owner: | set to |
comment:2 by , 14 years ago
comment:3 by , 14 years ago
Well, -xO4 is reasonable (switches automatic fn inlining on); -xO5 is reasonable as well, but it increases the compile time a bit.
comment:4 by , 14 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I don't really know what possible values of -xOsomething are there, and which one is considered the most reasonable value when optimizing for speed. If you tell me that, I can make the change. Thanks.