我正在尝试调试编译问题,但我似乎无法获得GCC(或者可能是make ??)来向我展示它正在执行的实际编译器和链接器命令.这是我看到的输出:
CCLD libvirt_parthelper
libvirt_parthelper-parthelper.o: In function `main':
/root/qemu-build/libvirt-0.9.0/src/storage/parthelper.c:102: undefined reference to `ped_device_get'
/root/qemu-build/libvirt-0.9.0/src/storage/parthelper.c:116: undefined reference to `ped_disk_new'
/root/qemu-build/libvirt-0.9.0/src/storage/parthelper.c:122: undefined reference to `ped_disk_next_partition'
/root/qemu-build/libvirt-0.9.0/src/storage/parthelper.c:172: undefined reference to `ped_disk_next_partition'
/root/qemu-build/libvirt-0.9.0/src/storage/parthelper.c:172: undefined reference to `ped_disk_next_partition'
collect2: ld returned 1 exit status
make[3]: *** [libvirt_parthelper] Error 1
Run Code Online (Sandbox Code Playgroud)
我想看到的应该与此类似:
$ make
gcc -Wall -c -o main.o main.c
gcc -Wall -c -o hello_fn.o hello_fn.c
gcc main.o hello_fn.o -o main
Run Code Online (Sandbox Code Playgroud)
请注意此示例如何显示完整的gcc命令.以上示例仅显示"CCLD libvirt_parthelper"之类的内容.我不确定如何控制这种行为.
在内核 Makefile 中我发现了如下代码:
ctags CTAGS CSCOPE: $(HEADERS) $(SOURCES)
$(ETAGS) $(ETAGSFALGS) $(HEADERS) $(SOURCES)
$(call cmd, ctags)
Run Code Online (Sandbox Code Playgroud)
另外,我在哪里可以找到宏或函数?