Hi I tried compiling uboot using Sifive toolchain, and got the following error ( I can compile using other 3rd party toolchain like xpack) don’t know why Sifive toolchain is giving an error)
CC lib/vsprintf.o
AS lib/efi_loader/efi_crt0.o
CC lib/efi_loader/efi_reloc.o
CC lib/strto.o
CC lib/efi_loader/efi_freestanding.o
CC lib/date.o
LD lib/efi_loader/helloworld_efi.so
riscv64-unknown-elf-ld.bfd: warning: -z nocombreloc ignored
riscv64-unknown-elf-ld.bfd: -shared not supported
scripts/Makefile.lib:394: recipe for target ‘lib/efi_loader/helloworld_efi.so’ failed
make[2]: *** [lib/efi_loader/helloworld_efi.so] Error 1
make[2]: *** Waiting for unfinished jobs…
scripts/Makefile.build:432: recipe for target ‘lib/efi_loader’ failed
make[1]: *** [lib/efi_loader] Error 2
make[1]: *** Waiting for unfinished jobs…
LD lib/libfdt/built-in.o
Makefile:1698: recipe for target ‘lib’ failed
make: *** [lib] Error 2
Procedure:
I set up the build variables as follows:
export ARCH=riscv
export PATH=“$PATH:/home/fahad/Documents/sorted/risc_v/FreedomStudio-2019-08-1-lin64/SiFive/riscv64-unknown-elf-gcc-8.3.0-2019.08.0/bin”
export CROSS_COMPILE=riscv64-unknown-elf-
Used the following commands to compile uboot:
- make sifive_fu540_defconfig
- make
However using another toolchain it works, seems to me either I am missing something or this may be a bug that -shared flag is not supported
Thanks,
Fahad