Fix: tests/Kbuild for older kernels
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 15 Jul 2016 15:29:33 +0000 (11:29 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Fri, 15 Jul 2016 15:34:40 +0000 (11:34 -0400)
commit50af1e023fbb291e9085be8762fc2ad60308c3a4
tree8c09150b63ce3099f8ec0ceb9bad18f4334dc75d
parentec0a7fba9ae64b9c36edbf027a249f37cef17b2f
Fix: tests/Kbuild for older kernels

Older kernels (e.g. 2.6.38.8) don't seem to handle subdirectory in the
same way as recent kernels (e.g. 4.6). As a result, building LTTng
out-of-tree within a kernel modified to have LTTng as a built-in addon
fails with CONFIG_LTTNG=m.

$ make all O=../kernel_builddir
.....
  CC [M]  lttng/probes/lttng-kprobes.o
  CC [M]  lttng/probes/lttng-kretprobes.o
  LD      lttng/tests/built-in.o
  CC [M]  lttng/tests/probes/lttng-test.o
Assembler messages:
Fatal error: can't create lttng/tests/probes/lttng-test.o: No such
file or directory
/media/awallin/sda1/home/awallin/src/lttng-test/linux-2.6/scripts/Makefile.build:264:
recipe for target 'lttng/tests/probes/lttng-test.o' failed
make[3]: *** [lttng/tests/probes/lttng-test.o] Error 2
/media/awallin/sda1/home/awallin/src/lttng-test/linux-2.6/scripts/Makefile.build:403:
recipe for target 'lttng/tests' failed
make[2]: *** [lttng/tests] Error 2
/media/awallin/sda1/home/awallin/src/lttng-test/linux-2.6/Makefile:946:
recipe for target 'lttng' failed
make[1]: *** [lttng] Error 2
make[1]: Leaving directory
'/media/awallin/sda1/home/awallin/src/lttng-test/kernel_builddir'
Makefile:146: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

$tree ../kernel_builddir/lttng/tests/
../kernel_builddir/lttng/tests/
└── built-in.o

Reported-by: Anders Wallin <anders.wallin@windriver.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
tests/Kbuild
This page took 0.025777 seconds and 4 git commands to generate.