From 697336483fab365dfc2bd038bcbe1d41a9ade693 Mon Sep 17 00:00:00 2001 From: tijl Date: Tue, 7 Sep 2010 08:33:17 +0000 Subject: 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 Reviewed by: kan Approved by: kib (mentor) MFC after: 2 weeks --- gnu/lib/libstdc++/Makefile | 2 +- gnu/lib/libstdc++/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/lib/libstdc++') 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 -- cgit v1.1