From: SeokYeon Hwang Date: Fri, 2 Dec 2016 09:09:37 +0000 (+0900) Subject: build: enhance compiler compatibility X-Git-Tag: TizenStudio_2.0_p4.0~6^2~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3a9fc4f0bb3fd67e82cfccedfc396b5dbc749627;p=sdk%2Femulator%2Fqemu.git build: enhance compiler compatibility Some built-in functions are depend on compiler version. So we exclude those functions when the source compiled by c++ compiler. Change-Id: I3a89552fc56c32b79e6c92f6a7c2e26ad2297233 Signed-off-by: SeokYeon Hwang --- diff --git a/include/qemu/atomic.h b/include/qemu/atomic.h index 43b0645..c2aa613 100644 --- a/include/qemu/atomic.h +++ b/include/qemu/atomic.h @@ -18,6 +18,9 @@ /* Compiler barrier */ #define barrier() ({ asm volatile("" ::: "memory"); (void)0; }) +#if defined(__ATOMIC_RELAXED) && !defined(__cplusplus) +/* For C11 atomic ops */ + /* The variable that receives the old value of an atomically-accessed * variable must be non-qualified, because atomic builtins return values * through a pointer-type argument as in __atomic_load(&var, &old, MODEL). @@ -60,9 +63,6 @@ (unsigned short)1, \ (expr)+0)))))) -#ifdef __ATOMIC_RELAXED -/* For C11 atomic ops */ - /* Manual memory barriers * *__atomic_thread_fence does not include a compiler barrier; instead, diff --git a/tizen/src/ui/displayglwidget.h b/tizen/src/ui/displayglwidget.h index 2008fc7..26cf7cf 100644 --- a/tizen/src/ui/displayglwidget.h +++ b/tizen/src/ui/displayglwidget.h @@ -39,6 +39,7 @@ #include extern "C" { +#include "qemu/compiler.h" #include "qemu/thread.h" // FIXME: move it to common header