mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-28 07:31:15 +00:00
lib: build charset.o only if needed
charset.o is only needed for the EFI subsystem Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
parent
7a9e6ee6eb
commit
fbb3ea806f
2 changed files with 12 additions and 5 deletions
|
@ -19,7 +19,10 @@ obj-$(CONFIG_ARCH_AT91) += at91/
|
|||
obj-$(CONFIG_OPTEE) += optee/
|
||||
|
||||
obj-$(CONFIG_AES) += aes.o
|
||||
obj-y += charset.o
|
||||
|
||||
ifndef API_BUILD
|
||||
obj-$(CONFIG_EFI_LOADER) += charset.o
|
||||
endif
|
||||
obj-$(CONFIG_USB_TTY) += circbuf.o
|
||||
obj-y += crc7.o
|
||||
obj-y += crc8.o
|
||||
|
|
|
@ -274,6 +274,8 @@ static char *string(char *buf, char *end, char *s, int field_width,
|
|||
return buf;
|
||||
}
|
||||
|
||||
/* U-Boot uses UTF-16 strings in the EFI context only. */
|
||||
#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD)
|
||||
static char *string16(char *buf, char *end, u16 *s, int field_width,
|
||||
int precision, int flags)
|
||||
{
|
||||
|
@ -294,8 +296,6 @@ static char *string16(char *buf, char *end, u16 *s, int field_width,
|
|||
return buf;
|
||||
}
|
||||
|
||||
/* Device paths only exist in the EFI context. */
|
||||
#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD)
|
||||
static char *device_path_string(char *buf, char *end, void *dp, int field_width,
|
||||
int precision, int flags)
|
||||
{
|
||||
|
@ -612,10 +612,14 @@ repeat:
|
|||
continue;
|
||||
|
||||
case 's':
|
||||
if (qualifier == 'l' && !IS_ENABLED(CONFIG_SPL_BUILD)) {
|
||||
/* U-Boot uses UTF-16 strings in the EFI context only. */
|
||||
#if CONFIG_IS_ENABLED(EFI_LOADER) && !defined(API_BUILD)
|
||||
if (qualifier == 'l') {
|
||||
str = string16(str, end, va_arg(args, u16 *),
|
||||
field_width, precision, flags);
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
str = string(str, end, va_arg(args, char *),
|
||||
field_width, precision, flags);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue