mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
Some macro's and defines are needed when parsing memory, and without compiling the kernel as -g3 they are not available in the debug-symbols. We use the pre-processor here to extract constants to a dedicated module for the linux debugger extensions Top level Kbuild is used to call in and generate the constants file, while maintaining dependencies on autogenerated files in include/generated Link: http://lkml.kernel.org/r/bc3df9c25f57ea72177c066a51a446fc19e2c27f.1462865983.git.jan.kiszka@siemens.com Signed-off-by: Kieran Bingham <kieran.bingham@linaro.org> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Cc: Michal Marek <mmarek@suse.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
539 B
539 B
always := gdb-scripts
SRCTREE := $(shell cd $(srctree) && /bin/pwd)
$(obj)/gdb-scripts: ifneq ($(KBUILD_SRC),) $(Q)ln -fsn $(SRCTREE)/$(obj)/*.py $(objtree)/$(obj) endif @:
quiet_cmd_gen_constants_py = GEN $@
cmd_gen_constants_py =
$(CPP) -E -x c -P $(c_flags) $< > $@ ;
sed -i '1,//d;' $@
$(obj)/constants.py: $(SRCTREE)/$(obj)/constants.py.in $(call if_changed,gen_constants_py)
build_constants_py: $(obj)/constants.py
clean-files := *.pyc .pyo $(if $(KBUILD_SRC),.py) $(obj)/constants.py