File tree Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Expand file tree Collapse file tree 1 file changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -322,18 +322,23 @@ done
322322
323323mkdir -p " $AR_SDK " 
324324
325+ #  Keep only -march, -mabi and -mlongcalls flags for Assembler
326+ PIO_AS_FLAGS=$( 
327+     { 
328+         echo  " $PIO_CXX_FLAGS "   |  grep -oE ' \-march=[^[:space:]]*|\-mabi=[^[:space:]]*|\-mlongcalls'  
329+         echo  " $PIO_CC_FLAGS "   |  grep -oE ' \-march=[^[:space:]]*|\-mabi=[^[:space:]]*|\-mlongcalls'  
330+     } |  awk ' !seen[$0]++'   |  paste -sd '  '  
331+ ) 
332+ 
325333#  start generation of pioarduino-build.py
326334AR_PLATFORMIO_PY=" $AR_SDK /pioarduino-build.py" 
327335cat configs/pio_start.txt >  " $AR_PLATFORMIO_PY " 
328336
329337echo  "     ASFLAGS=["   >>  " $AR_PLATFORMIO_PY " 
330- if  [ " $IS_XTENSA "   =  " y"   ];  then 
331- 	echo  "         \" -mlongcalls\" "   >>  " $AR_PLATFORMIO_PY " 
332- elif  [ " $IDF_TARGET "   =  " esp32p4"   ];  then 
333- 	echo  "         \" -march=rv32imafc_zicsr_zifencei_xesppie\" "   >>  " $AR_PLATFORMIO_PY " 
334- else 
335- 	echo  "         \" -march=rv32imc_zicsr_zifencei\" "   >>  " $AR_PLATFORMIO_PY " 
336- fi 
338+ set  -- $PIO_AS_FLAGS 
339+ for  item;  do 
340+ 	echo  "         \" $item \" ,"   >>  " $AR_PLATFORMIO_PY " 
341+ done 
337342echo  "     ],"   >>  " $AR_PLATFORMIO_PY " 
338343echo  " "   >>  " $AR_PLATFORMIO_PY " 
339344
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments