Default to a single-threaded build for Nintendo, Orbis, Sony PSP targets
authorIvan Maidanski <ivmai@mail.ru>
Wed, 19 Sep 2018 21:17:38 +0000 (00:17 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Wed, 19 Sep 2018 21:17:38 +0000 (00:17 +0300)
(fix of commits ce1f8746197182297ed5dad58d3cd63cf1e8)

* include/gc_config_macros.h [!GC_THREADS] (GC_THREADS): Do not check
SN_TARGET_ORBIS and SN_TARGET_PSP2 macros.
* include/private/gcconfig.h [X86_64 && SN_TARGET_ORBIS]: Do not
include pthread.h (should be included from gc_locks.h).
* include/private/gcconfig.h [NN_PLATFORM_CTR || NINTENDO_SWITCH
|| SN_TARGET_ORBIS || SN_TARGET_PS3 || SN_TARGET_PSP2] (THREADS):
Define only if GC_THREADS is defined.

include/gc_config_macros.h
include/private/gcconfig.h

index a043db8..d656e01 100644 (file)
@@ -76,8 +76,7 @@
     || defined(GC_IRIX_THREADS) || defined(GC_LINUX_THREADS) \
     || defined(GC_NETBSD_THREADS) || defined(GC_OPENBSD_THREADS) \
     || defined(GC_OSF1_THREADS) || defined(GC_SOLARIS_THREADS) \
-    || defined(GC_WIN32_THREADS) || defined(GC_RTEMS_PTHREADS) \
-    || defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PSP2)
+    || defined(GC_WIN32_THREADS) || defined(GC_RTEMS_PTHREADS)
 # ifndef GC_THREADS
 #   define GC_THREADS
 # endif
index 1fdf3d3..d87a9e6 100644 (file)
@@ -2580,9 +2580,6 @@ EXTERN_C_BEGIN
 #   ifdef SN_TARGET_ORBIS
 #     define DATASTART (ptr_t)ALIGNMENT
 #     define DATAEND (ptr_t)ALIGNMENT
-      EXTERN_C_END
-#     include <pthread.h>
-      EXTERN_C_BEGIN
       void *ps4_get_stack_bottom(void);
 #     define STACKBOTTOM ((ptr_t)ps4_get_stack_bottom())
 #   endif
@@ -3257,9 +3254,9 @@ EXTERN_C_BEGIN
 #endif /* !CPPCHECK */
 
 #if defined(PCR) || defined(GC_WIN32_THREADS) || defined(GC_PTHREADS) \
-    || defined(NN_PLATFORM_CTR) || defined(NINTENDO_SWITCH) \
-    || defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PS3) \
-    || defined(SN_TARGET_PSP2)
+    || ((defined(NN_PLATFORM_CTR) || defined(NINTENDO_SWITCH) \
+         || defined(SN_TARGET_ORBIS) || defined(SN_TARGET_PS3) \
+         || defined(SN_TARGET_PSP2)) && defined(GC_THREADS))
 # define THREADS
 #endif