Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
config: allow --with-linux without --with-linux-obj
Browse files Browse the repository at this point in the history
Don't use `uname -r` to determine kernel build directory when the user
specified kernel source with --with-linux. Otherwise, the user is forced
to use --with-linux-obj even if they are the same directory, which is
very counterintuitive.

Signed-off-by: Chunwei Chen <[email protected]>
  • Loading branch information
Chunwei Chen authored and behlendorf committed May 25, 2017
1 parent 3bda331 commit ac48361
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion config/spl-build.m4
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ AC_DEFUN([SPL_AC_KERNEL], [
if test "$kernelsrc" = "NONE"; then
kernsrcver=NONE
fi
withlinux=yes
fi
AC_MSG_RESULT([$kernelsrc])
Expand All @@ -125,7 +126,7 @@ AC_DEFUN([SPL_AC_KERNEL], [
AC_MSG_CHECKING([kernel build directory])
if test -z "$kernelbuild"; then
if test -e "/lib/modules/$(uname -r)/build"; then
if test x$withlinux != xyes -a -e "/lib/modules/$(uname -r)/build"; then
kernelbuild=`readlink -f /lib/modules/$(uname -r)/build`
elif test -d ${kernelsrc}-obj/${target_cpu}/${target_cpu}; then
kernelbuild=${kernelsrc}-obj/${target_cpu}/${target_cpu}
Expand Down

0 comments on commit ac48361

Please sign in to comment.