相关疑难解决方法(0)

如何强制make/gcc向我显示命令?

我正在尝试调试编译问题,但我似乎无法获得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"之类的内容.我不确定如何控制这种行为.

gcc makefile verbosity

250
推荐指数
7
解决办法
25万
查看次数

内核makefile中的$(call cmd,tags)这里的cmd指的是什么?

在内核 Makefile 中我发现了如下代码:

ctags CTAGS CSCOPE: $(HEADERS) $(SOURCES) 

$(ETAGS) $(ETAGSFALGS) $(HEADERS) $(SOURCES)

$(call cmd, ctags)
Run Code Online (Sandbox Code Playgroud)

另外,我在哪里可以找到宏或函数?

kernel makefile linux-kernel kbuild

6
推荐指数
1
解决办法
2106
查看次数

标签 统计

makefile ×2

gcc ×1

kbuild ×1

kernel ×1

linux-kernel ×1

verbosity ×1