Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
$ make CC=/Users/benmezger/Downloads/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-apple-darwin/bin/riscv64-unknown-elf-gcc DEBUG=1
rm -r -f kernel
riscv64-unknown-elf-gcc -march=rv64imafdc -mcmodel=medany -mabi=lp64d -DRISCV_ARCH -O0 -lgcc -I./include/ -g -DDEBUG -Wl,--gc-sections -nostartfiles -nodefaultlibs -Wl,-T,riscv64-virt.ld src/init.c src/string.c src/ftd.c src/kmain.c src/arch/riscv/cpu.c src/arch/riscv/entry.S src/arch/riscv/trap.c src/arch/riscv/crt0.S -o kernel
/Users/benmezger/Downloads/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-apple-darwin/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /var/folders/cm/0ds487q92074nx51t2sdt2lr0000gp/T//ccsL9Mg2.o: in function `_scan_fdt':
/Users/benmezger/workspace/new-kernel/src/ftd.c:29: undefined reference to `__bswapsi2'
/Users/benmezger/Downloads/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-apple-darwin/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /var/folders/cm/0ds487q92074nx51t2sdt2lr0000gp/T//ccsL9Mg2.o: in function `fdt_header':
/Users/benmezger/workspace/new-kernel/src/ftd.c:47: undefined reference to `__bswapsi2'
/Users/benmezger/Downloads/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-apple-darwin/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /Users/benmezger/workspace/new-kernel/src/ftd.c:48: undefined reference to `__bswapsi2'
/Users/benmezger/Downloads/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-apple-darwin/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /var/folders/cm/0ds487q92074nx51t2sdt2lr0000gp/T//ccsL9Mg2.o: in function `scan_fdt':
/Users/benmezger/workspace/new-kernel/src/ftd.c:59: undefined reference to `__bswapsi2'
/Users/benmezger/Downloads/riscv64-unknown-elf-gcc-8.3.0-2019.08.0-x86_64-apple-darwin/bin/../lib/gcc/riscv64-unknown-elf/8.3.0/../../../../riscv64-unknown-elf/bin/ld: /Users/benmezger/workspace/new-kernel/src/ftd.c:63: undefined reference to `__bswapsi2'
collect2: error: ld returned 1 exit status
make: *** [kernel] Error 1
~/workspace/new-kernel ∙
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.