Skip to content
Snippets Groups Projects
  • Patrick Delaunay's avatar
    ff7852d5
    build: remove the variable NM in gen_ll_addressable_symbols.sh · ff7852d5
    Patrick Delaunay authored and Tom Rini's avatar Tom Rini committed
    
    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's avatarSimon Glass <sjg@chromium.org>
    Signed-off-by: Patrick Delaunay's avatarPatrick Delaunay <patrick.delaunay@foss.st.com>
    ff7852d5
    History
    build: remove the variable NM in gen_ll_addressable_symbols.sh
    Patrick Delaunay authored and Tom Rini's avatar Tom Rini committed
    
    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's avatarSimon Glass <sjg@chromium.org>
    Signed-off-by: Patrick Delaunay's avatarPatrick Delaunay <patrick.delaunay@foss.st.com>