Date: Tue, 7 Sep 2010 08:33:17 +0000 (UTC) From: Tijl Coosemans <tijl@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r212286 - head/gnu/lib/libstdc++ Message-ID: <201009070833.o878XH3x088545@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: tijl Date: Tue Sep 7 08:33:17 2010 New Revision: 212286 URL: http://svn.freebsd.org/changeset/base/212286 Log: GCC defines built-ins for atomic instructions found on i486 and higher. Because FreeBSD no longer supports the 80386 cpu all code targeting FreeBSD/i386 necessarily runs on i486 or higher so the compiler built-ins can be used by default inside libstdc++ and in C++ headers. This allows newly compiled C++ code to inline some atomic operations. Old binaries continue to use libstdc++ functions. PR: 148926 Tested by: Yuri Karaban <tech askold net> Reviewed by: kan Approved by: kib (mentor) MFC after: 2 weeks Modified: head/gnu/lib/libstdc++/Makefile head/gnu/lib/libstdc++/config.h Modified: head/gnu/lib/libstdc++/Makefile ============================================================================== --- head/gnu/lib/libstdc++/Makefile Tue Sep 7 07:31:58 2010 (r212285) +++ head/gnu/lib/libstdc++/Makefile Tue Sep 7 08:33:17 2010 (r212286) @@ -83,7 +83,7 @@ ATOMICITY_H= ${SRCDIR}/config/cpu/${MARC ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity_mutex/atomicity.h .endif -.if ${MACHINE_CPUARCH} == "amd64" +.if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" .if exists(${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h) ATOMICITY_H= ${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h .endif Modified: head/gnu/lib/libstdc++/config.h ============================================================================== --- head/gnu/lib/libstdc++/config.h Tue Sep 7 07:31:58 2010 (r212285) +++ head/gnu/lib/libstdc++/config.h Tue Sep 7 08:33:17 2010 (r212286) @@ -671,7 +671,7 @@ /* #undef VERSION */ /* Define if builtin atomic operations are supported on this host. */ -#if defined(__amd64__) +#if defined(__amd64__) || defined(__i386__) #define _GLIBCXX_ATOMIC_BUILTINS 1 #endif
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009070833.o878XH3x088545>