Fix printf error + uninstall rules generation error + update configure

This commit is contained in:
Yatis 2020-11-01 11:01:39 +01:00
parent 15a286daf0
commit 6fa1e2498d
3 changed files with 14 additions and 20 deletions

11
configure vendored
View File

@ -211,22 +211,23 @@ ln -s $src $dst
#---
generate_config()
{
echo 'CONFIG.CFLAGS := '
echo 'CONFIG.TARGET := '
echo 'CONFIG.FORMAT := '
# build information
echo "CONFIG.TOOLCHAIN := $toolchain"
[ "$prefix" ] && echo "CONFIG.PREFIX := $prefix"
[ "$cflags" ] && echo "CONFIG.CFLAGS += $cflags"
# debug / unit tests
# extra flags
echo 'CONFIG.CFLAGS := '
[ "$cflags" ] && echo "CONFIG.CFLAGS += $cflags"
[ $debug = true ] && echo 'CONFIG.CFLAGS += -g3'
# ABI support
echo 'CONFIG.TARGET := fxlibc'
[ $support_vhex_kernel = true ] && echo 'CONFIG.TARGET += fxlibc-vhex'
[ $support_casio_abi_fx9860 = true ] && echo 'CONFIG.TARGET += fxlibc-fx9860g'
[ $support_casio_abi_fxcg50 = true ] && echo 'CONFIG.TARGET += fxlibc-fxcg50'
# formats
echo 'CONFIG.FORMAT := '
[ $format_static = true ] && echo 'CONFIG.FORMAT += static'
[ $format_dynamic = true ] && echo 'CONFIG.FORMAT += dynamic'
}

View File

@ -35,7 +35,7 @@
#---
MAJOR := 0
MINOR := 3
PATCH := 4
PATCH := 5
EXTRAVERSION :=
@ -210,25 +210,18 @@ version:
# @note:
# *1 - library pathname
define generate-install-rule
# get the library name (remove path information)
lib-basename := $(notdir $1)
# Genetate rules name
lib-install-rule := $$(basename $$(lib-basename))-install
lib-uninstall-rule := $$(basename $$(lib-basename))-uninstall
# Generate the installation rule
$$(lib-install-rule):
$(basename $(notdir $1))-install:
install -d $(CONFIG.PREFIX)
install $1 -m 644 $(CONFIG.PREFIX)
# Generate the uninstallation rule
$$(lib-uninstall-rule):
rm -f $(CONFIG.PREFIX)$$(lib-basename)
$(basename $(notdir $1))-uninstall:
rm -f $(CONFIG.PREFIX)$(notdir $1)
# Register generated rules into their appropriate list
lib-installation-rules += $$(lib-install-rule)
lib-uninstallation-rules += $$(lib-uninstall-rule)
lib-installation-rules += $(basename $(notdir $1))-install
lib-uninstallation-rules += $(basename $(notdir $1))-uninstall
endef

View File

@ -20,8 +20,8 @@ int printf_common(struct printf_opt *opt, const char *restrict format)
// Check printable char
if (format[p] != '%' || format[p + 1] == '%') {
tmp = format[p];
if (format[p] != '%')
tmp = format[++p];
if (format[p] == '%')
p = p + 1;
(*opt->disp_char)(opt,tmp);
continue;
}