Closed ghost closed 4 years ago
So I uncommented CFLAGS += -fstack-size-section
and created a symlink sudo ln -s /usr/lib/llvm-9/bin/clang /usr/bin/clang
and now make says
CC kernel/main.c CC kernel/task.c CC kernel/ipc.c CC kernel/syscall.c CC kernel/memory.c CC kernel/printk.c CC kernel/kdebug.c CC kernel/arch/x64/task.c CC kernel/arch/x64/vm.c CC kernel/arch/x64/serial.c CC servers/kvs/main.c CC libs/std/init.c CC libs/std/syscall.c CC libs/std/printf.c CC libs/std/malloc.c CC libs/std/io.c CC libs/std/lookup.c CC libs/std/session.c CC libs/std/async.c CC libs/std/arch/x64/start.S LD build/user/libs/std.o CC libs/stubs/tcpip.c LD build/user/libs/stubs.o CC libs/common/string.c CC libs/common/vprintf.c CC libs/common/ubsan.c CC libs/common/arch/x64/memcpy.S LD build/user/kvs.debug.elf SYMBOLS build/user/kvs.debug.elf STRIP build/user/kvs.elf CC servers/tcpip/main.c CC servers/tcpip/arp.c CC servers/tcpip/device.c CC servers/tcpip/dhcp.c CC servers/tcpip/ethernet.c CC servers/tcpip/ipv4.c CC servers/tcpip/mbuf.c CC servers/tcpip/tcp.c CC servers/tcpip/udp.c CC servers/tcpip/stats.c LD build/user/tcpip.debug.elf SYMBOLS build/user/tcpip.debug.elf STRIP build/user/tcpip.elf CC servers/ps2kbd/main.c LD build/user/ps2kbd.debug.elf SYMBOLS build/user/ps2kbd.debug.elf STRIP build/user/ps2kbd.elf CC servers/display/main.c LD build/user/display.debug.elf SYMBOLS build/user/display.debug.elf STRIP build/user/display.elf CC servers/e1000/main.c CC servers/e1000/e1000.c CC servers/e1000/pci.c LD build/user/e1000.debug.elf SYMBOLS build/user/e1000.debug.elf STRIP build/user/e1000.elf CC servers/shell/main.c LD build/user/shell.debug.elf SYMBOLS build/user/shell.debug.elf STRIP build/user/shell.elf CC servers/webapi/main.c LD build/user/webapi.debug.elf SYMBOLS build/user/webapi.debug.elf STRIP build/user/webapi.elf CC servers/benchmark/main.c LD build/user/benchmark.debug.elf SYMBOLS build/user/benchmark.debug.elf STRIP build/user/benchmark.elf CC servers/hello/main.c LD build/user/hello.debug.elf SYMBOLS build/user/hello.debug.elf STRIP build/user/hello.elf CC servers/init/main.c CC servers/init/pages.c LD build/user/init.debug.elf SYMBOLS build/user/init.debug.elf STRIP build/user/init.elf OBJCOPY build/init.bin llvm-objcopy-6.0: 'build/user/init.elf': The file was not recognized as a valid object file Makefile:107: recipe for target 'build/init.bin' failed make: *** [build/init.bin] Error 1
LLVM/Clang 6.x is too old to build Resea. Could you try with version 8.x or higher?
Also, LLVM_SUFFIX
option would be helpful:
$ make LLVM_SUFFIX=-8 run
The make command says
After commenting out
CFLAGS += -fstack-size-section
I get a lot ofThe compilation stops with
Fixed it by adding "-6.0" here
OBJCOPY := $(LLVM_PREFIX)llvm-objcopy-6.0$(LLVM_SUFFIX)
Then I get
After adding a space between all "-j" and "-O" make says
I don't know what to do. I'm on Linux Mint x64. clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)