Good morning (MET), On Wednesday 12 May 2010, Jason Daly wrote: > RHEL 5 has the same behavior. Unless you explicitly specify -march=i686 > (or something similar) for CFLAGS, it fails to detect GCC builtins. It > hasn't been a big problem for me, so I just chalked it up to RHEL 5 > being past its prime.
That is by design of gcc. And following that by design of the atomic tests. If you tell the compiler that it should compile with an allowed instruction set that does not contain any atomic operation at all, then you get codet that does not contain any atomic operation at all. So, you don't tell that explicitly, but you tell that by the defaults of gcc. If you just compile gcc with a plain configure line, you will get a 386 32 bit compiler that defaults to march=i386. Which means ise the instruction set of a really ancient i386 machine. This really means *the* machine with a TTL housing that was initially sold in the 80's. And yes at this time there was no chance to run anything that requires an atomic operation on a PC. No SMP and enough stuff to implement save interrupt handlers. So, if you specify explicitly or implicitly -march=i386 you can run that code on this old machine. Since this default is questionable, gcc has since several versions an ability to lift that default at configure time. Most distribuitions today raise this default to something reasonable. That mostly helps optimizing code and brings as a side effect implicit atomic support by default. So, what does this mean for osg. If we get that atomic builtins from gcc. We just use them. If gcc tells us to having that not available, resort to the mutex variant which is that what is available if it links. So, it is wise to use either a rencent distribution. Or specify at least -march=i686 or something better for your c*flags. Greetings Mathias -- Dr. Mathias Fröhlich, science + computing ag, Software Solutions Hagellocher Weg 71-75, D-72070 Tuebingen, Germany Phone: +49 7071 9457-268, Fax: +49 7071 9457-511 -- Vorstand/Board of Management: Dr. Bernd Finkbeiner, Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech Vorsitzender des Aufsichtsrats/ Chairman of the Supervisory Board: Michel Lepert Sitz/Registered Office: Tuebingen Registergericht/Registration Court: Stuttgart Registernummer/Commercial Register No.: HRB 382196 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

