]> git.baikalelectronics.ru Git - uboot.git/commit
build: remove the variable NM in gen_ll_addressable_symbols.sh
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Wed, 21 Jul 2021 07:56:07 +0000 (09:56 +0200)
committerTom Rini <trini@konsulko.com>
Thu, 29 Jul 2021 00:46:34 +0000 (20:46 -0400)
commit1203a0b7a4f0f322baaff6f1090ec21e8699dedd
tree99391eebf986c10b6d35079c35a51fb2884ab00b
parent06182e40282c772205f36f195e3a0f64eb60e1aa
build: remove the variable NM in gen_ll_addressable_symbols.sh

With LTO activated, the buildman tools failed with an error on my
configuration (Ubuntu 20.04, stm32mp15_trusted_defconfig) with the error:

../arm-linux-gnueabi/bin/nm:
scripts/gen_ll_addressable_symbols.sh: file format not recognized

It seems the shell variable initialization NM=$(NM) is not correctly
interpreted when shell is started in the Makefile, but I have not this
issue when I compile the same target without buildman.

I don't found the root reason of the problem but I solve it by
providing $(NM) as script parameter instead using a shell variable.

The command executed is identical:

cmd_keep-syms-lto.c := NM=arm-none-linux-gnueabihf-gcc-nm \
u-boot/scripts/gen_ll_addressable_symbols.sh arch/arm/cpu/built-in.o \
.... net/built-in.o >keep-syms-lto.c

cmd_keep-syms-lto.c := u-boot/scripts/gen_ll_addressable_symbols.sh \
arm-none-linux-gnueabihf-gcc-nm arch/arm/cpu/built-in.o \
... net/built-in.o > keep-syms-lto.c

Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
Makefile
scripts/Makefile.spl
scripts/gen_ll_addressable_symbols.sh