Skip to content

Commit

Permalink
x86, boot: Don't compile early_serial_console.c when !CONFIG_EARLY_PR…
Browse files Browse the repository at this point in the history
…INTK

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>
  • Loading branch information
Josh Triplett committed Aug 17, 2014
1 parent 9e6abd2 commit 3afed06
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
3 changes: 2 additions & 1 deletion arch/x86/boot/compressed/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@ hostprogs-y := mkpiggy
HOST_EXTRACFLAGS += -I$(srctree)/tools/include

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

vmlinux-objs-$(CONFIG_EARLY_PRINTK) += $(obj)/early_serial_console.o
vmlinux-objs-$(CONFIG_RANDOMIZE_BASE) += $(obj)/aslr.o

$(obj)/eboot.o: KBUILD_CFLAGS += -fshort-wchar -mno-red-zone
Expand Down
4 changes: 0 additions & 4 deletions arch/x86/boot/compressed/early_serial_console.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#include "misc.h"

#ifdef CONFIG_EARLY_PRINTK

int early_serial_base;

#include "../early_serial_console.c"

#endif

0 comments on commit 3afed06

Please sign in to comment.