Как мне заставить 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

То, что я хочу видеть, должно быть похоже на это:

$ 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

Обратите внимание, как в этом примере отображается полная команда gcc . В приведенном выше примере просто показаны такие вещи, как «CCLD libvirt_parthelper». Я не знаю, как контролировать такое поведение.

248
задан Peter Mortensen 5 July 2019 в 16:11
поделиться