mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 08:44:41 +00:00 
			
		
		
		
	kconfig: add CC_IS_GCC and GCC_VERSION
This will be useful to specify the required compiler version,
like this:
config FOO
        bool "Use Foo"
        depends on GCC_VERSION >= 40800
        help
          This feature requires GCC 4.8 or newer.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Kees Cook <keescook@chromium.org>
			
			
This commit is contained in:
		
							parent
							
								
									2a61f4747e
								
							
						
					
					
						commit
						a435389898
					
				
					 1 changed files with 8 additions and 0 deletions
				
			
		|  | @ -8,6 +8,14 @@ config DEFCONFIG_LIST | |||
| 	default ARCH_DEFCONFIG | ||||
| 	default "arch/$(ARCH)/defconfig" | ||||
| 
 | ||||
| config CC_IS_GCC | ||||
| 	def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc) | ||||
| 
 | ||||
| config GCC_VERSION | ||||
| 	int | ||||
| 	default $(shell,$(srctree)/scripts/gcc-version.sh -p $(CC) | sed 's/^0*//') if CC_IS_GCC | ||||
| 	default 0 | ||||
| 
 | ||||
| config CONSTRUCTORS | ||||
| 	bool | ||||
| 	depends on !UML | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Masahiro Yamada
						Masahiro Yamada