summaryrefslogtreecommitdiffstats
path: root/gnu/lib/libstdc++
diff options
context:
space:
mode:
authortijl <tijl@FreeBSD.org>2010-09-07 08:33:17 +0000
committertijl <tijl@FreeBSD.org>2010-09-07 08:33:17 +0000
commit697336483fab365dfc2bd038bcbe1d41a9ade693 (patch)
tree64dd7aa0b0dbb319f07666eb4b6cf758c7de9574 /gnu/lib/libstdc++
parent1137e0153efce87e436114c627d6e2aabd3f4f92 (diff)
downloadFreeBSD-src-697336483fab365dfc2bd038bcbe1d41a9ade693.zip
FreeBSD-src-697336483fab365dfc2bd038bcbe1d41a9ade693.tar.gz
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
Diffstat (limited to 'gnu/lib/libstdc++')
-rw-r--r--gnu/lib/libstdc++/Makefile2
-rw-r--r--gnu/lib/libstdc++/config.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/gnu/lib/libstdc++/Makefile b/gnu/lib/libstdc++/Makefile
index e0a7bb2..56ca626 100644
--- a/gnu/lib/libstdc++/Makefile
+++ b/gnu/lib/libstdc++/Makefile
@@ -83,7 +83,7 @@ ATOMICITY_H= ${SRCDIR}/config/cpu/${MARCHDIR}/atomicity.h
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
diff --git a/gnu/lib/libstdc++/config.h b/gnu/lib/libstdc++/config.h
index de4641d..8bc099f 100644
--- a/gnu/lib/libstdc++/config.h
+++ b/gnu/lib/libstdc++/config.h
@@ -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
OpenPOWER on IntegriCloud