]> git.ipfire.org Git - people/ms/u-boot.git/commitdiff
common: Only build cli_readline.o for CMDLINE on non-SPL
authorTom Rini <trini@konsulko.com>
Tue, 9 May 2017 02:14:34 +0000 (22:14 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 12 May 2017 12:37:33 +0000 (08:37 -0400)
With gcc-6 and later we may get a warning such as:
.../common/cli_readline.c:20:21: warning: ‘tab_seq’ defined but not used [-Wunused-const-variable=]
 static const char   tab_seq[] = "        "; /* used to expand TABs */
                     ^~~~~~~
.../common/cli_readline.c:19:19: warning: ‘erase_seq’ defined but not used [-Wunused-const-variable=]
 static const char erase_seq[] = "\b \b"; /* erase sequence */
                   ^~~~~~~~~

Because in SPL we're normally not doing interactive commands anyhow, so
lets just not compile this at all in SPL.  This also means that we need
to correct the logic (and comment) about what the drivers/ddr/fsl/ and
CONFIG_FSL_DDR_INTERACTIVE requires and this will be included in SPL
there.

Signed-off-by: Tom Rini <trini@konsulko.com>
common/Makefile

index bcd2486ff5d34b11ef3e2415bbcef6c962a81c8a..14d01844adb16217fe86ace331a923476f39d86c 100644 (file)
@@ -85,6 +85,7 @@ obj-$(CONFIG_SCSI) += scsi.o
 obj-$(CONFIG_UPDATE_TFTP) += update.o
 obj-$(CONFIG_DFU_TFTP) += update.o
 obj-$(CONFIG_USB_KEYBOARD) += usb_kbd.o
+obj-$(CONFIG_CMDLINE) += cli_readline.o cli_simple.o
 
 endif # !CONFIG_SPL_BUILD
 
@@ -168,11 +169,9 @@ endif
 ifdef CONFIG_CMD_EEPROM_LAYOUT
 obj-y += eeprom/eeprom_field.o eeprom/eeprom_layout.o
 endif
-# We always have this since drivers/ddr/fs/interactive.c needs it
-obj-$(CONFIG_CMDLINE) += cli_simple.o
 
 obj-y += cli.o
-obj-$(CONFIG_CMDLINE) += cli_readline.o
+obj-$(CONFIG_FSL_DDR_INTERACTIVE) += cli_simple.o cli_readline.o
 obj-$(CONFIG_CMD_DFU) += dfu.o
 obj-y += command.o
 obj-y += s_record.o