[U-Boot] [PATCH] imx: mx6/7 define CONFIG_SYS_VSNPRINTF

Peter Robinson pbrobinson at gmail.com
Thu Jan 14 03:24:47 CET 2016


On Wed, Jan 13, 2016 at 7:57 PM, Tom Rini <trini at konsulko.com> wrote:
> On Tue, Jan 12, 2016 at 05:45:24PM +0800, Peng Fan wrote:
>
>> From: Peng Fan <peng.fan at nxp.com>
>>
>> Define CONFIG_SYS_VSNPRINTF to use snprintf. If not define
>> CONFIG_SYS_VSNPRINTF, snprintf is sprintf.
>>
>> Report by Coverity:
>> pass string init_val of unknown size to sprintf
>>
>> Signed-off-by: Peng Fan <peng.fan at nxp.com>
>> Cc: Peter Robinson <pbrobinson at gmail.com>
>> Cc: Fabio Estevam <fabio.estevam at freescale.com>
>> Cc: Adrian Alonso <aalonso at freescale.com>
>> Cc: Stefano Babic <sbabic at denx.de>
>
> I'm not sure how I feel about fixing this range of issues only for
> certain targets.  I need to do some global building here and see what
> happens.

I'm not sure it's 100% the same, not had time to look closely, but it
looks similar to a build regression I'm seeing in the 2016.01 GA that
wasn't in RC4. Snippet below, or full build log at [1]

Peter

  gcc -Wp,-MD,spl/lib/.strto.o.d  -nostdinc -isystem
/usr/lib/gcc/armv7hl-redhat-linux-gnueabi/5.3.1/include -Iinclude
-I/builddir/build/BUILD/u-boot-2016.01/include
-I/builddir/build/BUILD/u-boot-2016.01/arch/arm/include -include
/builddir/build/BUILD/u-boot-2016.01/include/linux/kconfig.h
-I/builddir/build/BUILD/u-boot-2016.01/spl/lib -Ispl/lib -D__KERNEL__
-D__UBOOT__ -DCONFIG_SYS_TEXT_BASE=0x00100000 -DCONFIG_SPL_BUILD -Wall
-Wstrict-prototypes -Wno-format-security -fno-builtin -ffreestanding
-Os -fno-stack-protector -fno-delete-null-pointer-checks -g
-fstack-usage -Wno-format-nonliteral -Werror=date-time
-ffunction-sections -fdata-sections -D__ARM__ -Wa,-mimplicit-it=always
-mthumb -mthumb-interwork -mabi=aapcs-linux -mno-unaligned-access
-ffunction-sections -fdata-sections -fno-common -ffixed-r9
-msoft-float -pipe -march=armv7-a
-I/builddir/build/BUILD/u-boot-2016.01/arch/arm/mach-rockchip/include
  -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(strto)"
-D"KBUILD_MODNAME=KBUILD_STR(strto)" -c -o spl/lib/strto.o
/builddir/build/BUILD/u-boot-2016.01/lib/strto.c
   ld.bfd     -r -o spl/lib/built-in.o spl/lib/libfdt/built-in.o
spl/lib/fdtdec_common.o spl/lib/fdtdec.o spl/lib/hashtable.o
spl/lib/errno.o spl/lib/display_options.o spl/lib/crc32.o
spl/lib/ctype.o spl/lib/div64.o spl/lib/hang.o spl/lib/linux_compat.o
spl/lib/linux_string.o spl/lib/membuff.o spl/lib/slre.o
spl/lib/string.o spl/lib/time.o spl/lib/uuid.o spl/lib/tiny-printf.o
spl/lib/panic.o spl/lib/strto.o
  (cd spl && ld.bfd   -T u-boot-spl.lds  --gc-sections -Bstatic
--gc-sections -Ttext 0xff704004 arch/arm/cpu/armv7/start.o
--start-group arch/arm/mach-rockchip/built-in.o
arch/arm/cpu/armv7/built-in.o arch/arm/cpu/built-in.o
arch/arm/lib/built-in.o board/google/chromebook_jerry/built-in.o
board/google/common/built-in.o common/spl/built-in.o
common/init/built-in.o common/built-in.o drivers/built-in.o
dts/built-in.o fs/built-in.o lib/built-in.o --end-group
arch/arm/lib/eabi_compat.o arch/arm/lib/lib.a -Map u-boot-spl.map -o
u-boot-spl)
drivers/built-in.o: In function `spi_flash_probe_bus_cs':
/builddir/build/BUILD/u-boot-2016.01/drivers/mtd/spi/sf-uclass.c:61:
undefined reference to `sprintf'
/builddir/build/BUILD/u-boot-2016.01/scripts/Makefile.spl:244: recipe
for target 'spl/u-boot-spl' failed
make[2]: *** [spl/u-boot-spl] Error 1
/builddir/build/BUILD/u-boot-2016.01/Makefile:1330: recipe for target
'spl/u-boot-spl' failed
make[1]: Leaving directory
'/builddir/build/BUILD/u-boot-2016.01/builds/chromebook_jerry'
make[1]: *** [spl/u-boot-spl] Error 2
Makefile:150: recipe for target 'sub-make' failed
make: *** [sub-make] Error 2

[1] https://kojipkgs.fedoraproject.org//work/tasks/2458/12522458/build.log


More information about the U-Boot mailing list