Simon Clubley wrote: > > It looks like the compiler options -msse and -msse2 are added by the > current version of configure if it detects that the compiler supports > the options. > > However, and this is where I need a second opinion, I think that gcc > will accept them as valid options, and generate the related code, even > if the platform that gcc is running on does not actually support SSE2 > instructions.
That makes sense from a cross-compile standpoint. The target for the executable is not necessarily the same architecture that the compiler is running on. Of course, the binary should be configured for the execution target. But remember that configure is running on the compile machine, which may not be the execution target. It probably makes sense for configure to *default* to the features available on the machine running the configure script, with user overrides to allow setting tweaks for a different target. It does not make sense for configure to be checking for compiler features, it should be checking for machine features. This raises the question of when SSE and SSE2 are enabled by gcc's configure script. I've not looked into it or thought about the philosophy, but it certainly makes sense to allow the compiler to emit SSE and SSE2 even when compiling on machines that don't support them in order to enable cross-compile. But for the common scenario of one user with one machine with all builds self-hosted, then it would seem like turning off SSE and SSE2 in gcc's configure script saves some headaches. Did you build your gcc compilers yourself for these tests or use pre-built packages? BTW -- detection of SSE and SSE2 (among other things) is covered at the low level by Intel Application Note 485. I suspect configure primitives already exist to check for SSE and SSE2 -- I'm far from being a configure guru. -dave ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ BRL-CAD Users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/brlcad-users
