make clean all broken with -j? + question regarding modpost
From: Thomas Meyer
Date: Thu Aug 10 2017 - 11:44:39 EST
Hi,
1.) make with multiple targets
When running
$ make -j4 clean all
I get error from make (probably in scripts/Makefile.modbuiltin):
Output from above with V=1:
make -f ./scripts/Makefile.modbuiltin obj=drivers/tty/vt
make -f ./scripts/Makefile.modbuiltin obj=drivers/video/backlight
(for m in ; do echo kernel/$m; done; \
cat /dev/null ) > drivers/tty/vt/modules.builtin
(for m in ; do echo kernel/$m; done; \
cat /dev/null ) > drivers/video/backlight/modules.builtin
(for m in ; do echo kernel/$m; done; \
cat /dev/null drivers/tty/ipwireless/modules.builtin drivers/tty/serial/modules.builtin drivers/tty/vt/modules.builtin) > drivers/tty/modules.builtin
make -f ./scripts/Makefile.modbuiltin obj=drivers/video/fbdev
make -f ./scripts/Makefile.modbuiltin obj=drivers/virt
make -f ./scripts/Makefile.modbuiltin obj=drivers/video/fbdev/core
(for m in ; do echo kernel/$m; done; \
cat /dev/null ) > drivers/virt/modules.builtin
(for m in ; do echo kernel/$m; done; \
cat /dev/null ) > drivers/video/fbdev/core/modules.builtin
make -f ./scripts/Makefile.modbuiltin obj=drivers/video/fbdev/omap2
make -f ./scripts/Makefile.modbuiltin obj=drivers/watchdog
(for m in drivers/watchdog/pretimeout_panic.ko; do echo kernel/$m; done; \
cat /dev/null ) > drivers/watchdog/modules.builtin
g++ -shared -o scripts/gcc-plugins/cyc_complexity_plugin.so scripts/gcc-plugins/cyc_complexity_plugin.o
make -f ./scripts/Makefile.modbuiltin obj=drivers/video/fbdev/omap2/omapfb
make -f ./scripts/Makefile.modbuiltin obj=drivers/video/fbdev/omap2/omapfb/displays
(for m in ; do echo kernel/$m; done; \
cat /dev/null ) > drivers/video/fbdev/omap2/omapfb/displays/modules.builtin
make -f ./scripts/Makefile.modbuiltin obj=drivers/video/fbdev/omap2/omapfb/dss
(for m in ; do echo kernel/$m; done; \
cat /dev/null ) > drivers/video/fbdev/omap2/omapfb/dss/modules.builtin
(for m in ; do echo kernel/$m; done; \
cat /dev/null drivers/video/fbdev/omap2/omapfb/displays/modules.builtin drivers/video/fbdev/omap2/omapfb/dss/modules.builtin) > drivers/video/fbdev/omap2/omapfb/modules.builtin
(for m in ; do echo kernel/$m; done; \
cat /dev/null drivers/video/fbdev/omap2/omapfb/modules.builtin) > drivers/video/fbdev/omap2/modules.builtin
(for m in ; do echo kernel/$m; done; \
cat /dev/null drivers/video/fbdev/core/modules.builtin drivers/video/fbdev/omap2/modules.builtin) > drivers/video/fbdev/modules.builtin
(for m in ; do echo kernel/$m; done; \
cat /dev/null drivers/video/backlight/modules.builtin drivers/video/fbdev/modules.builtin) > drivers/video/modules.builtin
(for m in ; do echo kernel/$m; done; \
cat /dev/null drivers/accessibility/modules.builtin drivers/amba/modules.builtin drivers/android/modules.builtin drivers/auxdisplay/modules.builtin drivers/base/modules.builtin drivers/block/modules.builtin drivers/bus/modules.builtin drivers/cdrom/modules.builtin drivers/char/modules.builtin drivers/char/ipmi/modules.builtin drivers/clk/modules.builtin drivers/clocksource/modules.builtin drivers/crypto/modules.builtin drivers/dax/modules.builtin drivers/devfreq/modules.builtin drivers/dma-buf/modules.builtin drivers/extcon/modules.builtin drivers/firewire/modules.builtin drivers/firmware/modules.builtin drivers/gpio/modules.builtin drivers/gpu/modules.builtin drivers/hwtracing/intel_th/modules.builtin drivers/i2c/modules.builtin drivers/idle/modules.builtin drivers/iommu/modules.builtin drivers/irqchip/modules.builtin drivers/leds/modules.builtin drivers/lguest/modules.builtin drivers/macintosh/modules.builtin drivers/mailbox/modules.builtin drivers/md/modules.builtin drivers/media/modules.builtin drivers/memory/modules.builtin drivers/mfd/modules.builtin drivers/misc/modules.builtin drivers/mmc/modules.builtin drivers/net/modules.builtin drivers/nfc/modules.builtin drivers/nvme/modules.builtin drivers/of/modules.builtin drivers/pci/dwc/modules.builtin drivers/phy/modules.builtin drivers/platform/modules.builtin drivers/power/modules.builtin drivers/powercap/modules.builtin drivers/ptp/modules.builtin drivers/pwm/modules.builtin drivers/ras/modules.builtin drivers/regulator/modules.builtin drivers/reset/modules.builtin drivers/soc/modules.builtin drivers/staging/modules.builtin drivers/tty/modules.builtin drivers/usb/modules.builtin drivers/video/modules.builtin drivers/virt/modules.builtin drivers/watchdog/modules.builtin) > drivers/modules.builtin
cat: drivers/accessibility/modules.builtin: No such file or directory
cat: drivers/amba/modules.builtin: No such file or directory
cat: drivers/android/modules.builtin: No such file or directory
cat: drivers/auxdisplay/modules.builtin: No such file or directory
cat: drivers/base/modules.builtin: No such file or directory
cat: drivers/block/modules.builtin: No such file or directory
cat: drivers/bus/modules.builtin: No such file or directory
cat: drivers/cdrom/modules.builtin: No such file or directory
cat: drivers/char/modules.builtin: No such file or directory
cat: drivers/char/ipmi/modules.builtin: No such file or directory
cat: drivers/clk/modules.builtin: No such file or directory
cat: drivers/clocksource/modules.builtin: No such file or directory
cat: drivers/crypto/modules.builtin: No such file or directory
cat: drivers/dax/modules.builtin: No such file or directory
cat: drivers/devfreq/modules.builtin: No such file or directory
cat: drivers/dma-buf/modules.builtin: No such file or directory
cat: drivers/extcon/modules.builtin: No such file or directory
cat: drivers/firewire/modules.builtin: No such file or directory
cat: drivers/firmware/modules.builtin: No such file or directory
cat: drivers/gpio/modules.builtin: No such file or directory
cat: drivers/gpu/modules.builtin: No such file or directory
cat: drivers/hwtracing/intel_th/modules.builtin: No such file or directory
cat: drivers/i2c/modules.builtin: No such file or directory
cat: drivers/idle/modules.builtin: No such file or directory
cat: drivers/iommu/modules.builtin: No such file or directory
cat: drivers/irqchip/modules.builtin: No such file or directory
cat: drivers/leds/modules.builtin: No such file or directory
cat: drivers/lguest/modules.builtin: No such file or directory
cat: drivers/macintosh/modules.builtin: No such file or directory
cat: drivers/mailbox/modules.builtin: No such file or directory
cat: drivers/md/modules.builtin: No such file or directory
cat: drivers/memory/modules.builtin: No such file or directory
cat: drivers/mfd/modules.builtin: No such file or directory
cat: drivers/misc/modules.builtin: No such file or directory
cat: drivers/mmc/modules.builtin: No such file or directory
make[1]: *** [scripts/Makefile.modbuiltin:42: drivers/modules.builtin] Error 1
make: *** [Makefile:1224: drivers/modules.builtin] Error 2
make: *** Waiting for unfinished jobs....
g++ -Wp,-MD,scripts/gcc-plugins/.randomize_layout_plugin.o.d -O2 -I/usr/lib/gcc/x86_64-redhat-linux/7/plugin/include -Iscripts/gcc-plugins -std=gnu++98 -fno-rtti -fno-exceptions -fasynchronous-unwind-tables -ggdb -Wno-narrowing -Wno-unused-variable -fPIC -c -o scripts/gcc-plugins/randomize_layout_plugin.o scripts/gcc-plugins/randomize_layout_plugin.c
g++ -shared -o scripts/gcc-plugins/structleak_plugin.so scripts/gcc-plugins/structleak_plugin.o
g++ -shared -o scripts/gcc-plugins/latent_entropy_plugin.so scripts/gcc-plugins/latent_entropy_plugin.o
g++ -shared -o scripts/gcc-plugins/randomize_layout_plugin.so scripts/gcc-plugins/randomize_layout_plugin.o
make: Leaving directory '/home/thomas/git/linux'
but when running
$ make clean all
everything seems to work as expected. Bug or feature?
2.) compile modpost with debug symbols, -g
how do I compile the modpost helper program with debug symbols? In what
makefile, kbuild file do I need to add the compiler flag?
Any help would be appreciated!
with kind regards
thomas