mirror of
				https://git.proxmox.com/git/mirror_zfs.git
				synced 2025-10-26 18:05:04 +03:00 
			
		
		
		
	Make configure builtin-aware.
This patch adds a new option to configure: --enable-linux-builtin. When this option is used, the following happens: - Compilation of kernel modules is disabled. - A failure to find UTS_RELEASE is followed by a suggestion to run "make prepare" on the kernel source tree. This patch also adds a new test which tries to compile an empty module as a basic toolchain sanity test. If it fails and the option was specified, the error is followed by a suggestion to run "make scripts" on the kernel source tree. Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Issue zfsonlinux/zfs#851
This commit is contained in:
		
							parent
							
								
									38b5ff4d07
								
							
						
					
					
						commit
						0408008b33
					
				| @ -22,6 +22,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ | |||||||
| 	SPL_AC_DEBUG_LOG | 	SPL_AC_DEBUG_LOG | ||||||
| 	SPL_AC_DEBUG_KMEM | 	SPL_AC_DEBUG_KMEM | ||||||
| 	SPL_AC_DEBUG_KMEM_TRACKING | 	SPL_AC_DEBUG_KMEM_TRACKING | ||||||
|  | 	SPL_AC_TEST_MODULE | ||||||
| 	SPL_AC_ATOMIC_SPINLOCK | 	SPL_AC_ATOMIC_SPINLOCK | ||||||
| 	SPL_AC_TYPE_ATOMIC64_CMPXCHG | 	SPL_AC_TYPE_ATOMIC64_CMPXCHG | ||||||
| 	SPL_AC_TYPE_ATOMIC64_XCHG | 	SPL_AC_TYPE_ATOMIC64_XCHG | ||||||
| @ -94,7 +95,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [ | |||||||
| AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ | AC_DEFUN([SPL_AC_MODULE_SYMVERS], [ | ||||||
| 	modpost=$LINUX/scripts/Makefile.modpost | 	modpost=$LINUX/scripts/Makefile.modpost | ||||||
| 	AC_MSG_CHECKING([kernel file name for module symbols]) | 	AC_MSG_CHECKING([kernel file name for module symbols]) | ||||||
| 	if test -f "$modpost"; then | 	if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then | ||||||
| 		if grep -q Modules.symvers $modpost; then | 		if grep -q Modules.symvers $modpost; then | ||||||
| 			LINUX_SYMBOLS=Modules.symvers | 			LINUX_SYMBOLS=Modules.symvers | ||||||
| 		else | 		else | ||||||
| @ -196,7 +197,13 @@ AC_DEFUN([SPL_AC_KERNEL], [ | |||||||
| 		fi | 		fi | ||||||
| 	else | 	else | ||||||
| 		AC_MSG_RESULT([Not found]) | 		AC_MSG_RESULT([Not found]) | ||||||
|  | 		if test "x$enable_linux_builtin" != xyes; then | ||||||
| 			AC_MSG_ERROR([*** Cannot find UTS_RELEASE definition.]) | 			AC_MSG_ERROR([*** Cannot find UTS_RELEASE definition.]) | ||||||
|  | 		else | ||||||
|  | 			AC_MSG_ERROR([ | ||||||
|  | 	*** Cannot find UTS_RELEASE definition. | ||||||
|  | 	*** Please run 'make prepare' inside the kernel source tree.]) | ||||||
|  | 		fi | ||||||
| 	fi | 	fi | ||||||
| 
 | 
 | ||||||
| 	AC_MSG_RESULT([$kernsrcver]) | 	AC_MSG_RESULT([$kernsrcver]) | ||||||
| @ -444,6 +451,11 @@ AC_DEFUN([SPL_AC_CONFIG], [ | |||||||
| 		AS_HELP_STRING([--with-config=CONFIG], | 		AS_HELP_STRING([--with-config=CONFIG], | ||||||
| 		[Config file 'kernel|user|all|srpm']), | 		[Config file 'kernel|user|all|srpm']), | ||||||
| 		[SPL_CONFIG="$withval"]) | 		[SPL_CONFIG="$withval"]) | ||||||
|  | 	AC_ARG_ENABLE([linux-builtin], | ||||||
|  | 		[AC_HELP_STRING([--enable-linux-builtin], | ||||||
|  | 		[Configure for builtin in-tree kernel modules @<:@default=no@:>@])], | ||||||
|  | 		[], | ||||||
|  | 		[enable_linux_builtin=no]) | ||||||
| 
 | 
 | ||||||
| 	AC_MSG_CHECKING([spl config]) | 	AC_MSG_CHECKING([spl config]) | ||||||
| 	AC_MSG_RESULT([$SPL_CONFIG]); | 	AC_MSG_RESULT([$SPL_CONFIG]); | ||||||
| @ -462,11 +474,10 @@ AC_DEFUN([SPL_AC_CONFIG], [ | |||||||
| 	esac | 	esac | ||||||
| 
 | 
 | ||||||
| 	AM_CONDITIONAL([CONFIG_USER], | 	AM_CONDITIONAL([CONFIG_USER], | ||||||
|                        [test "$SPL_CONFIG" = user] || | 	               [test "$SPL_CONFIG" = user -o "$SPL_CONFIG" = all]) | ||||||
|                        [test "$SPL_CONFIG" = all]) |  | ||||||
| 	AM_CONDITIONAL([CONFIG_KERNEL], | 	AM_CONDITIONAL([CONFIG_KERNEL], | ||||||
|                        [test "$SPL_CONFIG" = kernel] || | 	               [test "$SPL_CONFIG" = kernel -o "$SPL_CONFIG" = all] && | ||||||
|                        [test "$SPL_CONFIG" = all]) | 	               [test "x$enable_linux_builtin" != xyes ]) | ||||||
| ]) | ]) | ||||||
| 
 | 
 | ||||||
| dnl # | dnl # | ||||||
| @ -738,6 +749,25 @@ AC_DEFUN([SPL_CHECK_HEADER], | |||||||
| 	]) | 	]) | ||||||
| ]) | ]) | ||||||
| 
 | 
 | ||||||
|  | dnl # | ||||||
|  | dnl # Basic toolchain sanity check. | ||||||
|  | dnl # | ||||||
|  | AC_DEFUN([SPL_AC_TEST_MODULE], | ||||||
|  | 	[AC_MSG_CHECKING([whether modules can be built]) | ||||||
|  | 	SPL_LINUX_TRY_COMPILE([],[],[ | ||||||
|  | 		AC_MSG_RESULT([yes]) | ||||||
|  | 	],[ | ||||||
|  | 		AC_MSG_RESULT([no]) | ||||||
|  | 		if test "x$enable_linux_builtin" != xyes; then | ||||||
|  | 			AC_MSG_ERROR([*** Unable to build an empty module.]) | ||||||
|  | 		else | ||||||
|  | 			AC_MSG_ERROR([ | ||||||
|  | 	*** Unable to build an empty module. | ||||||
|  | 	*** Please run 'make scripts' inside the kernel source tree.]) | ||||||
|  | 		fi | ||||||
|  | 	]) | ||||||
|  | ]) | ||||||
|  | 
 | ||||||
| dnl # | dnl # | ||||||
| dnl # Use the atomic implemenation based on global spinlocks.  This | dnl # Use the atomic implemenation based on global spinlocks.  This | ||||||
| dnl # should only be needed by 32-bit kernels which do not provide | dnl # should only be needed by 32-bit kernels which do not provide | ||||||
|  | |||||||
							
								
								
									
										205
									
								
								configure
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										205
									
								
								configure
									
									
									
									
										vendored
									
									
								
							| @ -962,6 +962,7 @@ enable_fast_install | |||||||
| with_gnu_ld | with_gnu_ld | ||||||
| enable_libtool_lock | enable_libtool_lock | ||||||
| with_config | with_config | ||||||
|  | enable_linux_builtin | ||||||
| with_linux | with_linux | ||||||
| with_linux_obj | with_linux_obj | ||||||
| enable_debug | enable_debug | ||||||
| @ -1619,6 +1620,8 @@ Optional Features: | |||||||
|   --enable-fast-install[=PKGS] |   --enable-fast-install[=PKGS] | ||||||
|                           optimize for fast installation [default=yes] |                           optimize for fast installation [default=yes] | ||||||
|   --disable-libtool-lock  avoid locking (might break parallel builds) |   --disable-libtool-lock  avoid locking (might break parallel builds) | ||||||
|  |   --enable-linux-builtin  Configure for builtin in-tree kernel modules | ||||||
|  |                           [default=no] | ||||||
|   --enable-debug          Enable generic debug support [default=no] |   --enable-debug          Enable generic debug support [default=no] | ||||||
|   --enable-debug-log      Enable basic debug logging [default=yes] |   --enable-debug-log      Enable basic debug logging [default=yes] | ||||||
|   --enable-debug-kmem     Enable basic kmem accounting [default=yes] |   --enable-debug-kmem     Enable basic kmem accounting [default=yes] | ||||||
| @ -4789,13 +4792,13 @@ if test "${lt_cv_nm_interface+set}" = set; then | |||||||
| else | else | ||||||
|   lt_cv_nm_interface="BSD nm" |   lt_cv_nm_interface="BSD nm" | ||||||
|   echo "int some_variable = 0;" > conftest.$ac_ext |   echo "int some_variable = 0;" > conftest.$ac_ext | ||||||
|   (eval echo "\"\$as_me:4792: $ac_compile\"" >&5) |   (eval echo "\"\$as_me:4795: $ac_compile\"" >&5) | ||||||
|   (eval "$ac_compile" 2>conftest.err) |   (eval "$ac_compile" 2>conftest.err) | ||||||
|   cat conftest.err >&5 |   cat conftest.err >&5 | ||||||
|   (eval echo "\"\$as_me:4795: $NM \\\"conftest.$ac_objext\\\"\"" >&5) |   (eval echo "\"\$as_me:4798: $NM \\\"conftest.$ac_objext\\\"\"" >&5) | ||||||
|   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) |   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) | ||||||
|   cat conftest.err >&5 |   cat conftest.err >&5 | ||||||
|   (eval echo "\"\$as_me:4798: output\"" >&5) |   (eval echo "\"\$as_me:4801: output\"" >&5) | ||||||
|   cat conftest.out >&5 |   cat conftest.out >&5 | ||||||
|   if $GREP 'External.*some_variable' conftest.out > /dev/null; then |   if $GREP 'External.*some_variable' conftest.out > /dev/null; then | ||||||
|     lt_cv_nm_interface="MS dumpbin" |     lt_cv_nm_interface="MS dumpbin" | ||||||
| @ -6001,7 +6004,7 @@ ia64-*-hpux*) | |||||||
|   ;; |   ;; | ||||||
| *-*-irix6*) | *-*-irix6*) | ||||||
|   # Find out which ABI we are using. |   # Find out which ABI we are using. | ||||||
|   echo '#line 6004 "configure"' > conftest.$ac_ext |   echo '#line 6007 "configure"' > conftest.$ac_ext | ||||||
|   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 |   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | ||||||
|   (eval $ac_compile) 2>&5 |   (eval $ac_compile) 2>&5 | ||||||
|   ac_status=$? |   ac_status=$? | ||||||
| @ -7854,11 +7857,11 @@ else | |||||||
|    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | ||||||
|    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||||||
|    -e 's:$: $lt_compiler_flag:'` |    -e 's:$: $lt_compiler_flag:'` | ||||||
|    (eval echo "\"\$as_me:7857: $lt_compile\"" >&5) |    (eval echo "\"\$as_me:7860: $lt_compile\"" >&5) | ||||||
|    (eval "$lt_compile" 2>conftest.err) |    (eval "$lt_compile" 2>conftest.err) | ||||||
|    ac_status=$? |    ac_status=$? | ||||||
|    cat conftest.err >&5 |    cat conftest.err >&5 | ||||||
|    echo "$as_me:7861: \$? = $ac_status" >&5 |    echo "$as_me:7864: \$? = $ac_status" >&5 | ||||||
|    if (exit $ac_status) && test -s "$ac_outfile"; then |    if (exit $ac_status) && test -s "$ac_outfile"; then | ||||||
|      # The compiler can only warn and ignore the option if not recognized |      # The compiler can only warn and ignore the option if not recognized | ||||||
|      # So say no if there are warnings other than the usual output. |      # So say no if there are warnings other than the usual output. | ||||||
| @ -8193,11 +8196,11 @@ else | |||||||
|    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | ||||||
|    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||||||
|    -e 's:$: $lt_compiler_flag:'` |    -e 's:$: $lt_compiler_flag:'` | ||||||
|    (eval echo "\"\$as_me:8196: $lt_compile\"" >&5) |    (eval echo "\"\$as_me:8199: $lt_compile\"" >&5) | ||||||
|    (eval "$lt_compile" 2>conftest.err) |    (eval "$lt_compile" 2>conftest.err) | ||||||
|    ac_status=$? |    ac_status=$? | ||||||
|    cat conftest.err >&5 |    cat conftest.err >&5 | ||||||
|    echo "$as_me:8200: \$? = $ac_status" >&5 |    echo "$as_me:8203: \$? = $ac_status" >&5 | ||||||
|    if (exit $ac_status) && test -s "$ac_outfile"; then |    if (exit $ac_status) && test -s "$ac_outfile"; then | ||||||
|      # The compiler can only warn and ignore the option if not recognized |      # The compiler can only warn and ignore the option if not recognized | ||||||
|      # So say no if there are warnings other than the usual output. |      # So say no if there are warnings other than the usual output. | ||||||
| @ -8298,11 +8301,11 @@ else | |||||||
|    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | ||||||
|    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||||||
|    -e 's:$: $lt_compiler_flag:'` |    -e 's:$: $lt_compiler_flag:'` | ||||||
|    (eval echo "\"\$as_me:8301: $lt_compile\"" >&5) |    (eval echo "\"\$as_me:8304: $lt_compile\"" >&5) | ||||||
|    (eval "$lt_compile" 2>out/conftest.err) |    (eval "$lt_compile" 2>out/conftest.err) | ||||||
|    ac_status=$? |    ac_status=$? | ||||||
|    cat out/conftest.err >&5 |    cat out/conftest.err >&5 | ||||||
|    echo "$as_me:8305: \$? = $ac_status" >&5 |    echo "$as_me:8308: \$? = $ac_status" >&5 | ||||||
|    if (exit $ac_status) && test -s out/conftest2.$ac_objext |    if (exit $ac_status) && test -s out/conftest2.$ac_objext | ||||||
|    then |    then | ||||||
|      # The compiler can only warn and ignore the option if not recognized |      # The compiler can only warn and ignore the option if not recognized | ||||||
| @ -8353,11 +8356,11 @@ else | |||||||
|    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ |    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ | ||||||
|    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ |    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ | ||||||
|    -e 's:$: $lt_compiler_flag:'` |    -e 's:$: $lt_compiler_flag:'` | ||||||
|    (eval echo "\"\$as_me:8356: $lt_compile\"" >&5) |    (eval echo "\"\$as_me:8359: $lt_compile\"" >&5) | ||||||
|    (eval "$lt_compile" 2>out/conftest.err) |    (eval "$lt_compile" 2>out/conftest.err) | ||||||
|    ac_status=$? |    ac_status=$? | ||||||
|    cat out/conftest.err >&5 |    cat out/conftest.err >&5 | ||||||
|    echo "$as_me:8360: \$? = $ac_status" >&5 |    echo "$as_me:8363: \$? = $ac_status" >&5 | ||||||
|    if (exit $ac_status) && test -s out/conftest2.$ac_objext |    if (exit $ac_status) && test -s out/conftest2.$ac_objext | ||||||
|    then |    then | ||||||
|      # The compiler can only warn and ignore the option if not recognized |      # The compiler can only warn and ignore the option if not recognized | ||||||
| @ -11156,7 +11159,7 @@ else | |||||||
|   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||||||
|   lt_status=$lt_dlunknown |   lt_status=$lt_dlunknown | ||||||
|   cat > conftest.$ac_ext <<_LT_EOF |   cat > conftest.$ac_ext <<_LT_EOF | ||||||
| #line 11159 "configure" | #line 11162 "configure" | ||||||
| #include "confdefs.h" | #include "confdefs.h" | ||||||
| 
 | 
 | ||||||
| #if HAVE_DLFCN_H | #if HAVE_DLFCN_H | ||||||
| @ -11252,7 +11255,7 @@ else | |||||||
|   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 |   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 | ||||||
|   lt_status=$lt_dlunknown |   lt_status=$lt_dlunknown | ||||||
|   cat > conftest.$ac_ext <<_LT_EOF |   cat > conftest.$ac_ext <<_LT_EOF | ||||||
| #line 11255 "configure" | #line 11258 "configure" | ||||||
| #include "confdefs.h" | #include "confdefs.h" | ||||||
| 
 | 
 | ||||||
| #if HAVE_DLFCN_H | #if HAVE_DLFCN_H | ||||||
| @ -11727,6 +11730,13 @@ if test "${with_config+set}" = set; then | |||||||
|   withval=$with_config; SPL_CONFIG="$withval" |   withval=$with_config; SPL_CONFIG="$withval" | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|  | 	# Check whether --enable-linux-builtin was given. | ||||||
|  | if test "${enable_linux_builtin+set}" = set; then | ||||||
|  |   enableval=$enable_linux_builtin; | ||||||
|  | else | ||||||
|  |   enable_linux_builtin=no | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| 	{ $as_echo "$as_me:$LINENO: checking spl config" >&5 | 	{ $as_echo "$as_me:$LINENO: checking spl config" >&5 | ||||||
| $as_echo_n "checking spl config... " >&6; } | $as_echo_n "checking spl config... " >&6; } | ||||||
| @ -11836,9 +11846,19 @@ $as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} | |||||||
| 	else | 	else | ||||||
| 		{ $as_echo "$as_me:$LINENO: result: Not found" >&5 | 		{ $as_echo "$as_me:$LINENO: result: Not found" >&5 | ||||||
| $as_echo "Not found" >&6; } | $as_echo "Not found" >&6; } | ||||||
|  | 		if test "x$enable_linux_builtin" != xyes; then | ||||||
| 			{ { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 | 			{ { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 | ||||||
| $as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} | $as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} | ||||||
|    { (exit 1); exit 1; }; } |    { (exit 1); exit 1; }; } | ||||||
|  | 		else | ||||||
|  | 			{ { $as_echo "$as_me:$LINENO: error: | ||||||
|  | 	*** Cannot find UTS_RELEASE definition. | ||||||
|  | 	*** Please run 'make prepare' inside the kernel source tree." >&5 | ||||||
|  | $as_echo "$as_me: error: | ||||||
|  | 	*** Cannot find UTS_RELEASE definition. | ||||||
|  | 	*** Please run 'make prepare' inside the kernel source tree." >&2;} | ||||||
|  |    { (exit 1); exit 1; }; } | ||||||
|  | 		fi | ||||||
| 	fi | 	fi | ||||||
| 
 | 
 | ||||||
| 	{ $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 | 	{ $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 | ||||||
| @ -11856,7 +11876,7 @@ $as_echo "$kernsrcver" >&6; } | |||||||
| 	modpost=$LINUX/scripts/Makefile.modpost | 	modpost=$LINUX/scripts/Makefile.modpost | ||||||
| 	{ $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 | 	{ $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 | ||||||
| $as_echo_n "checking kernel file name for module symbols... " >&6; } | $as_echo_n "checking kernel file name for module symbols... " >&6; } | ||||||
| 	if test -f "$modpost"; then | 	if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then | ||||||
| 		if grep -q Modules.symvers $modpost; then | 		if grep -q Modules.symvers $modpost; then | ||||||
| 			LINUX_SYMBOLS=Modules.symvers | 			LINUX_SYMBOLS=Modules.symvers | ||||||
| 		else | 		else | ||||||
| @ -12091,6 +12111,74 @@ $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } | |||||||
| 	{ $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 | 	{ $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 | ||||||
| $as_echo "$enable_debug_kmem_tracking" >&6; } | $as_echo "$enable_debug_kmem_tracking" >&6; } | ||||||
| 
 | 
 | ||||||
|  | 	{ $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 | ||||||
|  | $as_echo_n "checking whether modules can be built... " >&6; } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | cat confdefs.h - <<_ACEOF >conftest.c | ||||||
|  | /* confdefs.h.  */ | ||||||
|  | _ACEOF | ||||||
|  | cat confdefs.h >>conftest.$ac_ext | ||||||
|  | cat >>conftest.$ac_ext <<_ACEOF | ||||||
|  | /* end confdefs.h.  */ | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | int | ||||||
|  | main (void) | ||||||
|  | { | ||||||
|  | 
 | ||||||
|  |   ; | ||||||
|  |   return 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | _ACEOF | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 	rm -Rf build && mkdir -p build | ||||||
|  | 	echo "obj-m := conftest.o" >build/Makefile | ||||||
|  | 	if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' | ||||||
|  |   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||||||
|  |   (eval $ac_try) 2>&5 | ||||||
|  |   ac_status=$? | ||||||
|  |   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||||||
|  |   (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' | ||||||
|  |   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||||||
|  |   (eval $ac_try) 2>&5 | ||||||
|  |   ac_status=$? | ||||||
|  |   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||||||
|  |   (exit $ac_status); }; }; then | ||||||
|  | 
 | ||||||
|  | 		{ $as_echo "$as_me:$LINENO: result: yes" >&5 | ||||||
|  | $as_echo "yes" >&6; } | ||||||
|  | 
 | ||||||
|  | else | ||||||
|  |   $as_echo "$as_me: failed program was:" >&5 | ||||||
|  | sed 's/^/| /' conftest.$ac_ext >&5 | ||||||
|  | 
 | ||||||
|  | 		{ $as_echo "$as_me:$LINENO: result: no" >&5 | ||||||
|  | $as_echo "no" >&6; } | ||||||
|  | 		if test "x$enable_linux_builtin" != xyes; then | ||||||
|  | 			{ { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5 | ||||||
|  | $as_echo "$as_me: error: *** Unable to build an empty module." >&2;} | ||||||
|  |    { (exit 1); exit 1; }; } | ||||||
|  | 		else | ||||||
|  | 			{ { $as_echo "$as_me:$LINENO: error: | ||||||
|  | 	*** Unable to build an empty module. | ||||||
|  | 	*** Please run 'make scripts' inside the kernel source tree." >&5 | ||||||
|  | $as_echo "$as_me: error: | ||||||
|  | 	*** Unable to build an empty module. | ||||||
|  | 	*** Please run 'make scripts' inside the kernel source tree." >&2;} | ||||||
|  |    { (exit 1); exit 1; }; } | ||||||
|  | 		fi | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | 	rm -Rf build | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| 	# Check whether --enable-atomic-spinlocks was given. | 	# Check whether --enable-atomic-spinlocks was given. | ||||||
| if test "${enable_atomic_spinlocks+set}" = set; then | if test "${enable_atomic_spinlocks+set}" = set; then | ||||||
| @ -16412,9 +16500,19 @@ $as_echo "$as_me: error: *** Cannot determine kernel version." >&2;} | |||||||
| 	else | 	else | ||||||
| 		{ $as_echo "$as_me:$LINENO: result: Not found" >&5 | 		{ $as_echo "$as_me:$LINENO: result: Not found" >&5 | ||||||
| $as_echo "Not found" >&6; } | $as_echo "Not found" >&6; } | ||||||
|  | 		if test "x$enable_linux_builtin" != xyes; then | ||||||
| 			{ { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 | 			{ { $as_echo "$as_me:$LINENO: error: *** Cannot find UTS_RELEASE definition." >&5 | ||||||
| $as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} | $as_echo "$as_me: error: *** Cannot find UTS_RELEASE definition." >&2;} | ||||||
|    { (exit 1); exit 1; }; } |    { (exit 1); exit 1; }; } | ||||||
|  | 		else | ||||||
|  | 			{ { $as_echo "$as_me:$LINENO: error: | ||||||
|  | 	*** Cannot find UTS_RELEASE definition. | ||||||
|  | 	*** Please run 'make prepare' inside the kernel source tree." >&5 | ||||||
|  | $as_echo "$as_me: error: | ||||||
|  | 	*** Cannot find UTS_RELEASE definition. | ||||||
|  | 	*** Please run 'make prepare' inside the kernel source tree." >&2;} | ||||||
|  |    { (exit 1); exit 1; }; } | ||||||
|  | 		fi | ||||||
| 	fi | 	fi | ||||||
| 
 | 
 | ||||||
| 	{ $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 | 	{ $as_echo "$as_me:$LINENO: result: $kernsrcver" >&5 | ||||||
| @ -16432,7 +16530,7 @@ $as_echo "$kernsrcver" >&6; } | |||||||
| 	modpost=$LINUX/scripts/Makefile.modpost | 	modpost=$LINUX/scripts/Makefile.modpost | ||||||
| 	{ $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 | 	{ $as_echo "$as_me:$LINENO: checking kernel file name for module symbols" >&5 | ||||||
| $as_echo_n "checking kernel file name for module symbols... " >&6; } | $as_echo_n "checking kernel file name for module symbols... " >&6; } | ||||||
| 	if test -f "$modpost"; then | 	if test "x$enable_linux_builtin" != xyes -a -f "$modpost"; then | ||||||
| 		if grep -q Modules.symvers $modpost; then | 		if grep -q Modules.symvers $modpost; then | ||||||
| 			LINUX_SYMBOLS=Modules.symvers | 			LINUX_SYMBOLS=Modules.symvers | ||||||
| 		else | 		else | ||||||
| @ -16667,6 +16765,74 @@ $as_echo_n "checking whether detailed kmem tracking is enabled... " >&6; } | |||||||
| 	{ $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 | 	{ $as_echo "$as_me:$LINENO: result: $enable_debug_kmem_tracking" >&5 | ||||||
| $as_echo "$enable_debug_kmem_tracking" >&6; } | $as_echo "$enable_debug_kmem_tracking" >&6; } | ||||||
| 
 | 
 | ||||||
|  | 	{ $as_echo "$as_me:$LINENO: checking whether modules can be built" >&5 | ||||||
|  | $as_echo_n "checking whether modules can be built... " >&6; } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | cat confdefs.h - <<_ACEOF >conftest.c | ||||||
|  | /* confdefs.h.  */ | ||||||
|  | _ACEOF | ||||||
|  | cat confdefs.h >>conftest.$ac_ext | ||||||
|  | cat >>conftest.$ac_ext <<_ACEOF | ||||||
|  | /* end confdefs.h.  */ | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | int | ||||||
|  | main (void) | ||||||
|  | { | ||||||
|  | 
 | ||||||
|  |   ; | ||||||
|  |   return 0; | ||||||
|  | } | ||||||
|  | 
 | ||||||
|  | _ACEOF | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 	rm -Rf build && mkdir -p build | ||||||
|  | 	echo "obj-m := conftest.o" >build/Makefile | ||||||
|  | 	if { ac_try='cp conftest.c build && make modules -C $LINUX_OBJ EXTRA_CFLAGS="-Werror-implicit-function-declaration $EXTRA_KCFLAGS" $ARCH_UM M=$PWD/build' | ||||||
|  |   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||||||
|  |   (eval $ac_try) 2>&5 | ||||||
|  |   ac_status=$? | ||||||
|  |   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||||||
|  |   (exit $ac_status); }; } >/dev/null && { ac_try='test -s build/conftest.o' | ||||||
|  |   { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | ||||||
|  |   (eval $ac_try) 2>&5 | ||||||
|  |   ac_status=$? | ||||||
|  |   $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5 | ||||||
|  |   (exit $ac_status); }; }; then | ||||||
|  | 
 | ||||||
|  | 		{ $as_echo "$as_me:$LINENO: result: yes" >&5 | ||||||
|  | $as_echo "yes" >&6; } | ||||||
|  | 
 | ||||||
|  | else | ||||||
|  |   $as_echo "$as_me: failed program was:" >&5 | ||||||
|  | sed 's/^/| /' conftest.$ac_ext >&5 | ||||||
|  | 
 | ||||||
|  | 		{ $as_echo "$as_me:$LINENO: result: no" >&5 | ||||||
|  | $as_echo "no" >&6; } | ||||||
|  | 		if test "x$enable_linux_builtin" != xyes; then | ||||||
|  | 			{ { $as_echo "$as_me:$LINENO: error: *** Unable to build an empty module." >&5 | ||||||
|  | $as_echo "$as_me: error: *** Unable to build an empty module." >&2;} | ||||||
|  |    { (exit 1); exit 1; }; } | ||||||
|  | 		else | ||||||
|  | 			{ { $as_echo "$as_me:$LINENO: error: | ||||||
|  | 	*** Unable to build an empty module. | ||||||
|  | 	*** Please run 'make scripts' inside the kernel source tree." >&5 | ||||||
|  | $as_echo "$as_me: error: | ||||||
|  | 	*** Unable to build an empty module. | ||||||
|  | 	*** Please run 'make scripts' inside the kernel source tree." >&2;} | ||||||
|  |    { (exit 1); exit 1; }; } | ||||||
|  | 		fi | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | fi | ||||||
|  | 
 | ||||||
|  | 	rm -Rf build | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| 	# Check whether --enable-atomic-spinlocks was given. | 	# Check whether --enable-atomic-spinlocks was given. | ||||||
| if test "${enable_atomic_spinlocks+set}" = set; then | if test "${enable_atomic_spinlocks+set}" = set; then | ||||||
| @ -20898,8 +21064,7 @@ $as_echo "$as_me: error: Bad value \"$SPL_CONFIG\" for --with-config, | |||||||
|    { (exit 1); exit 1; }; } ;; |    { (exit 1); exit 1; }; } ;; | ||||||
| 	esac | 	esac | ||||||
| 
 | 
 | ||||||
|          if test "$SPL_CONFIG" = user || | 	 if test "$SPL_CONFIG" = user -o "$SPL_CONFIG" = all; then | ||||||
|                        test "$SPL_CONFIG" = all; then |  | ||||||
|   CONFIG_USER_TRUE= |   CONFIG_USER_TRUE= | ||||||
|   CONFIG_USER_FALSE='#' |   CONFIG_USER_FALSE='#' | ||||||
| else | else | ||||||
| @ -20907,8 +21072,8 @@ else | |||||||
|   CONFIG_USER_FALSE= |   CONFIG_USER_FALSE= | ||||||
| fi | fi | ||||||
| 
 | 
 | ||||||
|          if test "$SPL_CONFIG" = kernel || | 	 if test "$SPL_CONFIG" = kernel -o "$SPL_CONFIG" = all && | ||||||
|                        test "$SPL_CONFIG" = all; then | 	               test "x$enable_linux_builtin" != xyes ; then | ||||||
|   CONFIG_KERNEL_TRUE= |   CONFIG_KERNEL_TRUE= | ||||||
|   CONFIG_KERNEL_FALSE='#' |   CONFIG_KERNEL_FALSE='#' | ||||||
| else | else | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user
	 Etienne Dechamps
						Etienne Dechamps