~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/scripts/dummy-tools/gcc

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /scripts/dummy-tools/gcc (Version linux-6.12-rc7) and /scripts/dummy-tools/gcc (Version linux-5.6.19)


  1 #!/bin/sh                                         
  2 # SPDX-License-Identifier: GPL-2.0-only           
  3 #                                                 
  4 # Staring v4.18, Kconfig evaluates compiler ca    
  5 # options your compiler does not support. This    
  6 # build the kernel on the same host machine.      
  7 #                                                 
  8 # It is inconvenient if you prepare the .confi    
  9 # build environment (typically this happens wh    
 10 # distros) because using a different compiler     
 11 # CONFIG options than the real build environme    
 12 # as many options visible as possible. In othe    
 13 # super-set of CONFIG options that cover any b    
 14 # CONFIG options turned out to be unsupported     
 15 # automatically disabled by the nature of Kcon    
 16 #                                                 
 17 # However, it is not feasible to get a full-fe    
 18 # Hence these dummy toolchains to make all com    
 19 #                                                 
 20 # Usage:                                          
 21 #                                                 
 22 # From the top directory of the source tree, r    
 23 #                                                 
 24 #   $ make CROSS_COMPILE=scripts/dummy-tools/     
 25 #                                                 
 26 # Most of compiler features are tested by cc-o    
 27 # exit code of $(CC). This script does nothing    
 28 # cases. So, $(cc-option, ...) is evaluated as    
 29 #                                                 
 30 # This scripts caters to more checks; handle -    
 31 # etc. to pretend to be GCC, and also do right    
 32                                                   
 33 # Check if the first parameter appears in the     
 34 # This helper is useful if a particular option    
 35 # Typically used like this:                       
 36 #   arg_contain <word-you-are-searching-for> "    
 37 arg_contain ()                                    
 38 {                                                 
 39         search="$1"                               
 40         shift                                     
 41                                                   
 42         while [ $# -gt 0 ]                        
 43         do                                        
 44                 if [ "$search" = "$1" ]; then     
 45                         return 0                  
 46                 fi                                
 47                 shift                             
 48         done                                      
 49                                                   
 50         return 1                                  
 51 }                                                 
 52                                                   
 53 # To set CONFIG_CC_IS_GCC=y                       
 54 if arg_contain --version "$@"; then               
 55         echo "gcc (scripts/dummy-tools/gcc)"      
 56         exit 0                                    
 57 fi                                                
 58                                                   
 59 if arg_contain -E "$@"; then                      
 60         # For scripts/cc-version.sh; This emul    
 61         if arg_contain - "$@"; then               
 62                 sed -n '/^GCC/{s/__GNUC__/20/;    
 63                 exit 0                            
 64         else                                      
 65                 echo "no input files" >&2         
 66                 exit 1                            
 67         fi                                        
 68 fi                                                
 69                                                   
 70 # To set CONFIG_AS_IS_GNU                         
 71 if arg_contain -Wa,--version "$@"; then           
 72         echo "GNU assembler (scripts/dummy-too    
 73         exit 0                                    
 74 fi                                                
 75                                                   
 76 if arg_contain -S "$@"; then                      
 77         # For scripts/gcc-x86-*-has-stack-prot    
 78         if arg_contain -fstack-protector "$@";    
 79                 if arg_contain -mstack-protect    
 80                         echo "%fs"                
 81                 else                              
 82                         echo "%gs"                
 83                 fi                                
 84                 exit 0                            
 85         fi                                        
 86                                                   
 87         # For arch/powerpc/tools/gcc-check-mpr    
 88         if arg_contain -m64 "$@" && arg_contai    
 89                 if ! test -t 0 && ! grep -q no    
 90                         echo "_mcount"            
 91                 fi                                
 92                 exit 0                            
 93         fi                                        
 94                                                   
 95         # For arch/powerpc/tools/gcc-check-fpa    
 96         if arg_contain -m64 "$@" && arg_contai    
 97                 echo "func:"                      
 98                 echo ".section __patchable_fun    
 99                 echo ".localentry"                
100                 echo "  nop"                      
101                 echo "  nop"                      
102                 exit 0                            
103         fi                                        
104 fi                                                
105                                                   
106 # To set GCC_PLUGINS                              
107 if arg_contain -print-file-name=plugin "$@"; t    
108         # Use $0 to find the in-tree dummy dir    
109         echo "$(dirname "$(readlink -f "$0")")    
110         exit 0                                    
111 fi                                                
112                                                   
113 # inverted return value                           
114 if arg_contain -D__SIZEOF_INT128__=0 "$@"; the    
115         exit 1                                    
116 fi                                                
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php