mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-15 16:24:13 +08:00
x86, boot: Don't compile early_serial_console.c when !CONFIG_EARLY_PRINTK
All the code in early_serial_console.c gets compiled out if !CONFIG_EARLY_PRINTK, but early_serial_console.o itself still gets compiled in. Eliminate it from the compile entirely in that case. This does not change the generated code at all, in either case. Signed-off-by: Josh Triplett <josh@joshtriplett.org>
This commit is contained in:
parent
9e6abd2a98
commit
3afed06a35
@ -27,9 +27,10 @@ hostprogs-y := mkpiggy
|
|||||||
HOST_EXTRACFLAGS += -I$(srctree)/tools/include
|
HOST_EXTRACFLAGS += -I$(srctree)/tools/include
|
||||||
|
|
||||||
vmlinux-objs-y := $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \
|
vmlinux-objs-y := $(obj)/vmlinux.lds $(obj)/head_$(BITS).o $(obj)/misc.o \
|
||||||
$(obj)/string.o $(obj)/cmdline.o $(obj)/early_serial_console.o \
|
$(obj)/string.o $(obj)/cmdline.o \
|
||||||
$(obj)/piggy.o $(obj)/cpuflags.o
|
$(obj)/piggy.o $(obj)/cpuflags.o
|
||||||
|
|
||||||
|
vmlinux-objs-$(CONFIG_EARLY_PRINTK) += $(obj)/early_serial_console.o
|
||||||
vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/aslr.o
|
vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/aslr.o
|
||||||
|
|
||||||
$(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
|
$(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
#include "misc.h"
|
#include "misc.h"
|
||||||
|
|
||||||
#ifdef CONFIG_EARLY_PRINTK
|
|
||||||
|
|
||||||
int early_serial_base;
|
int early_serial_base;
|
||||||
|
|
||||||
#include "../early_serial_console.c"
|
#include "../early_serial_console.c"
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user