File tree Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Expand file tree Collapse file tree 2 files changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -505,6 +505,8 @@ class LLVM_LIBRARY_VISIBILITY RTEMSTargetInfo : public OSTargetInfo<Target> {
505505
506506    Builder.defineMacro (" __rtems__" 
507507    Builder.defineMacro (" __ELF__" 
508+     if  (Opts.CPlusPlus )
509+       Builder.defineMacro (" _GNU_SOURCE" 
508510  }
509511
510512public: 
Original file line number Diff line number Diff line change 89558955// KFREEBSDI686-DEFINE:#define __GLIBC__ 1 
89568956// 
89578957// RUN: %clang_cc1 -x c++ -triple i686-pc-linux-gnu -fobjc-runtime=gcc -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GNUSOURCE %s 
8958+ // RUN: %clang_cc1 -x c++ -triple sparc-rtems-elf -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix GNUSOURCE %s 
89588959// GNUSOURCE:#define _GNU_SOURCE 1 
89598960// 
89608961// RUN: %clang_cc1 -x c++ -std=c++98 -fno-rtti -E -dM < /dev/null | FileCheck -match-full-lines -check-prefix NORTTI %s 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments