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:35:48 +0000 (11:35 -0400)
commitf37e05c62a2f5739e2f25db53cb6dc741029547c
treed4cae7319f67ff3ab30ace6e34b6519c4017c6a0
parentacf0bdf5f001188f079209e7a32015b39453d95b
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.028137 seconds and 4 git commands to generate.