File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,6 @@ else()
123123  message (FATAL_ERROR "Unsupported platform. OS: ${CMAKE_SYSTEM_NAME} , arch: ${TARGET_ARCH_NAME} " )
124124endif ()
125125
126- if (TARGET_ARCH_NAME MATCHES  "^(x86|x64|s390x|armv6|loongarch64|riscv64| ppc64le)$" )
126+ if (TARGET_ARCH_NAME MATCHES  "^(x86|x64|s390x|armv6|loongarch64|ppc64le)$" )
127127  set_cache_value(HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES_EXITCODE 0)
128128endif ()
Original file line number Diff line number Diff line change @@ -697,6 +697,11 @@ int main()
697697set (CMAKE_REQUIRED_LIBRARIES)
698698
699699if (NOT  CLR_CMAKE_HOST_ARCH_ARM AND  NOT  CLR_CMAKE_HOST_ARCH_ARM64)
700+   if  (CLR_CMAKE_TARGET_ARCH_RISCV64 AND  CMAKE_CROSSCOMPILING )
701+     unset (CMAKE_CROSSCOMPILING )
702+     set (CMAKE_RESTORE_CROSSCOMPILING 1)
703+   endif ()
704+ 
700705  set (CMAKE_REQUIRED_LIBRARIES pthread)
701706  check_cxx_source_runs(" 
702707  // This test case verifies the pthread process-shared robust mutex's cross-process abandon detection. The parent process starts 
@@ -883,6 +888,11 @@ if(NOT CLR_CMAKE_HOST_ARCH_ARM AND NOT CLR_CMAKE_HOST_ARCH_ARM64)
883888      return result >= 0 ? result : 0; 
884889  }"  HAVE_FUNCTIONAL_PTHREAD_ROBUST_MUTEXES)
885890  set (CMAKE_REQUIRED_LIBRARIES)
891+ 
892+   if (CMAKE_RESTORE_CROSSCOMPILING)
893+     set (CMAKE_CROSSCOMPILING )
894+     unset (CMAKE_RESTORE_CROSSCOMPILING)
895+   endif ()
886896endif ()
887897
888898if (CLR_CMAKE_TARGET_OSX)
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments