From mboxrd@z Thu Jan 1 00:00:00 1970 From: pebolle@tiscali.nl (Paul Bolle) Date: Wed, 07 Jan 2015 19:57:26 +0100 Subject: realmode _WAKEUP In-Reply-To: References: <1420649650.438.8.camel@x220> Message-ID: <1420657046.24143.18.camel@x220> To: kernelnewbies@lists.kernelnewbies.org List-Id: kernelnewbies.lists.kernelnewbies.org On Wed, 2015-01-07 at 23:59 +0600, Alexander Kuleshov wrote: > Yes i saw video-*.c files, but i can't understand how compilation of > these video-*.c files depends on _WAKEUP macro... > > For example if'd remove -D_WAKEUP, i get errors during realmode.elf linking: > > arch/x86/realmode/rm/video-vga.o: In function `vga_probe': > /home/alex/dev/linux/arch/x86/realmode/rm/../../boot/video-vga.c:259: > undefined reference to `boot_params' > > As you wrote there are many #ifndef/#endif directives, but why there > _WAKEUP is undefined everytime, but we pass it from command line with > -D_WAKEUP? Because these file also get compiled via arch/x86/boot/Makefile? Ie, I _guess_ _WAKEUP is needed to ensure the compile started from arch/x86/realmode/rm/Makefile differs from the compile started from arch/x86/boot/Makefile. But [...]/boot/Makefile is sufficiently complicated for me to stop me from looking at it too long! You do realize that the Linux kernel is a treasure trove for people wanting to know just how far make, gcc, etc can be pushed, don't you? Paul Bolle