Fixed C++ conflicts with qemu headers 79/275379/1
authorvarinder.p <varinder.p@samsung.com>
Wed, 18 May 2022 05:53:42 +0000 (11:23 +0530)
committerVarinder Pratap Singh <varinder.p@samsung.com>
Tue, 24 May 2022 02:32:54 +0000 (08:02 +0530)
Change-Id: Id191c18ab77afddbedc442192b5e9cdef0667458
Signed-off-by: varinder.p <varinder.p@samsung.com>
include/qemu/atomic.h
include/qemu/compiler.h
tizen/emulator_configure.sh
tizen/src/ui/displayglwidget.cpp
tizen/src/util/osutil-darwin.c

index ff72db51154ca9aeab8e46cfb548d594ef9e95f8..e24cf0bc2a05b970835af283a6d5928a28859c3f 100644 (file)
 #define atomic_fetch_inc(ptr)  __atomic_fetch_add(ptr, 1, __ATOMIC_SEQ_CST)
 #define atomic_fetch_dec(ptr)  __atomic_fetch_sub(ptr, 1, __ATOMIC_SEQ_CST)
 
-#ifndef atomic_fetch_add
+#ifndef __cplusplus
 #define atomic_fetch_add(ptr, n) __atomic_fetch_add(ptr, n, __ATOMIC_SEQ_CST)
 #define atomic_fetch_sub(ptr, n) __atomic_fetch_sub(ptr, n, __ATOMIC_SEQ_CST)
 #define atomic_fetch_and(ptr, n) __atomic_fetch_and(ptr, n, __ATOMIC_SEQ_CST)
 #define atomic_fetch_inc(ptr)  __sync_fetch_and_add(ptr, 1)
 #define atomic_fetch_dec(ptr)  __sync_fetch_and_add(ptr, -1)
 
-#ifndef atomic_fetch_add
+#ifndef __cplusplus
 #define atomic_fetch_add(ptr, n) __sync_fetch_and_add(ptr, n)
 #define atomic_fetch_sub(ptr, n) __sync_fetch_and_sub(ptr, n)
 #define atomic_fetch_and(ptr, n) __sync_fetch_and_and(ptr, n)
index c76281f3540bf07a13c5608c68256e72c2e54aec..6a2ba1af4077fb262af64dba1c0f63b7406331c7 100644 (file)
@@ -89,7 +89,7 @@
  * supported; otherwise, it will be omitted from the compiler error
  * message (but as it remains present in the source code, it can still
  * be useful when debugging). */
-#if defined(CONFIG_STATIC_ASSERT)
+#if defined(CONFIG_STATIC_ASSERT) && !defined(__cplusplus)
 #define QEMU_BUILD_BUG_MSG(x, msg) _Static_assert(!(x), msg)
 #elif defined(__COUNTER__)
 #define QEMU_BUILD_BUG_MSG(x, msg) typedef QEMU_BUILD_BUG_ON_STRUCT(x) \
index e0bd8d6c2750fd6c2214ea7f2acd49025919d05e..81c03758abbd0f0612e08f18bc9cfb6428f612bc 100755 (executable)
@@ -210,7 +210,6 @@ CONFIGURE_APPEND="
  --extra-cflags=-Wno-error=logical-not-parentheses
  --extra-cflags=-Wno-error=strict-prototypes 
  --extra-ldflags=-Wl,-rpath,'@executable_path'
- --extra-ldflags=-Wl,-no_weak_imports
  --audio-drv-list=coreaudio
  --enable-cocoa
  --enable-hax
index aeded3e09d39bb63ad79f0fc9a0aa748bcb3c507..5cfcf727cadc09d9b45c9fd06022fa82a4840700 100644 (file)
@@ -33,8 +33,6 @@ extern "C" {
 #define QObject qemu_QObject
 #define QList qemu_QList
 #define bind qemu_bind
-//declare _Static_assert as there is none for cpp file in qemu 
-#define _Static_assert(x , msg) //Q_ASSERT_X(x , "tizen/ui/displayglwidget.o", msg) 
 #include "qemu/osdep.h"
 #include "qemu/thread.h"
 #undef QObject
index c797ca8df013fcb76ce3ccb2b86a9510112484c7..c5bbe971d8f27e5369204a54a9372e8d525bf760 100644 (file)
@@ -32,6 +32,7 @@
   @brief    Collection of utilities for darwin
  */
 
+#include "qemu/osdep.h"
 #include <sys/sysctl.h>
 #include <sys/utsname.h>