File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -1120,7 +1120,16 @@ build_single_target() {
11201120    #  it requires manually installing package `libclang-rt-17-dev`.
11211121    elif  [ " ${_OS} " =  ' linux' &&  [ " ${_DISTRO} " =  ' debian' ;  then 
11221122      if  [ " ${unamem} " =  " ${_machine} " ||  [ -d  ' my-pkg/usr/lib/clang' ;  then 
1123-         _CCRT=' clang-rt' 
1123+         #  FIXME: This combination fails to link with clang-rt, due to:
1124+         #         ld.lld-17: error: relocation R_RISCV_PCREL_HI20 cannot be used against symbol '__global_pointer$'; recompile with -fPIC
1125+         #         >>> defined in /usr/riscv64-linux-gnu/lib/Scrt1.o
1126+         #         >>> referenced by /usr/riscv64-linux-gnu/lib/Scrt1.o:(.text+0x2C)
1127+         #         Our workaround is to fall back to gcc parts for this.
1128+         if  [ " ${_CRT} " =  ' gnu' &&  [ " ${_CPU} " =  ' r64' ;  then 
1129+           : 
1130+         else 
1131+           _CCRT=' clang-rt' 
1132+         fi 
11241133      fi 
11251134    fi 
11261135  fi 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments