mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Linux compat: fix DECLARE_EVENT_CLASS() test when ZFS is built-in
ZFS_LINUX_TRY_COMPILE_HEADER macro doesn't take CONFIG_ZFS=y into account. As a result, on several latest Linux versions, configure script marks DECLARE_EVENT_CLASS() available for non-GPL when ZFS is being built as a module, but marks it unavailable when ZFS is built-in. Follow the logic of the neighbor macros and adjust ZFS_LINUX_TRY_COMPILE_HEADER accordingly, so that it doesn't try to look for a .ko when ZFS is built-in. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu> Signed-off-by: Alexander Lobakin <alobakin@pm.me> Closes #14006
This commit is contained in:
		
							parent
							
								
									df000276b8
								
							
						
					
					
						commit
						3e767e34bd
					
				| @ -932,8 +932,15 @@ dnl # like ZFS_LINUX_TRY_COMPILE, except the contents conftest.h are | |||||||
| dnl # provided via the fifth parameter | dnl # provided via the fifth parameter | ||||||
| dnl # | dnl # | ||||||
| AC_DEFUN([ZFS_LINUX_TRY_COMPILE_HEADER], [ | AC_DEFUN([ZFS_LINUX_TRY_COMPILE_HEADER], [ | ||||||
| 	ZFS_LINUX_COMPILE_IFELSE( | 	AS_IF([test "x$enable_linux_builtin" = "xyes"], [ | ||||||
| 	    [ZFS_LINUX_TEST_PROGRAM([[$1]], [[$2]], [[ZFS_META_LICENSE]])], | 		ZFS_LINUX_COMPILE_IFELSE( | ||||||
| 	    [test -f build/conftest/conftest.ko], | 		    [ZFS_LINUX_TEST_PROGRAM([[$1]], [[$2]], | ||||||
| 	    [$3], [$4], [$5]) | 		    [[ZFS_META_LICENSE]])], | ||||||
|  | 		    [test -f build/conftest/conftest.o], [$3], [$4], [$5]) | ||||||
|  | 	], [ | ||||||
|  | 		ZFS_LINUX_COMPILE_IFELSE( | ||||||
|  | 		    [ZFS_LINUX_TEST_PROGRAM([[$1]], [[$2]], | ||||||
|  | 		    [[ZFS_META_LICENSE]])], | ||||||
|  | 		    [test -f build/conftest/conftest.ko], [$3], [$4], [$5]) | ||||||
|  | 	]) | ||||||
| ]) | ]) | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Alexander
						Alexander