svn commit: r212963 - stable/7/gnu/lib/libstdc++

Tijl Coosemans tijl at FreeBSD.org
Tue Sep 21 12:57:44 UTC 2010


Author: tijl
Date: Tue Sep 21 12:57:43 2010
New Revision: 212963
URL: http://svn.freebsd.org/changeset/base/212963

Log:
  MFC r212286:
  
  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.
  
  Approved by:	kib (mentor)

Modified:
  stable/7/gnu/lib/libstdc++/Makefile
  stable/7/gnu/lib/libstdc++/config.h
Directory Properties:
  stable/7/gnu/lib/libstdc++/   (props changed)

Modified: stable/7/gnu/lib/libstdc++/Makefile
==============================================================================
--- stable/7/gnu/lib/libstdc++/Makefile	Tue Sep 21 12:55:20 2010	(r212962)
+++ stable/7/gnu/lib/libstdc++/Makefile	Tue Sep 21 12:57:43 2010	(r212963)
@@ -82,7 +82,7 @@ ATOMICITY_H=	${SRCDIR}/config/cpu/${MARC
 ATOMICITY_H=	${SRCDIR}/config/cpu/generic/atomicity_mutex/atomicity.h
 .endif
 
-.if ${MACHINE_ARCH} == "amd64"
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "i386"
 .if exists(${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h)
 ATOMICITY_H=	${SRCDIR}/config/cpu/generic/atomicity_builtins/atomicity.h
 .endif

Modified: stable/7/gnu/lib/libstdc++/config.h
==============================================================================
--- stable/7/gnu/lib/libstdc++/config.h	Tue Sep 21 12:55:20 2010	(r212962)
+++ stable/7/gnu/lib/libstdc++/config.h	Tue Sep 21 12:57:43 2010	(r212963)
@@ -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
 


More information about the svn-src-stable mailing list