mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Updated RISC-V toolchain.
This commit is contained in:
@@ -39,6 +39,7 @@ function toolchain(_buildDir, _libDir)
|
||||
{ "pnacl", "Native Client - PNaCl" },
|
||||
{ "orbis", "Orbis" },
|
||||
{ "qnx-arm", "QNX/Blackberry - ARM" },
|
||||
{ "riscv", "RISC-V" },
|
||||
{ "rpi", "RaspberryPi" },
|
||||
},
|
||||
}
|
||||
@@ -406,9 +407,9 @@ function toolchain(_buildDir, _libDir)
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-rpi"))
|
||||
|
||||
elseif "riscv" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "$(RISCV_DIR)/bin/riscv64-unknown-elf-gcc"
|
||||
premake.gcc.cxx = "$(RISCV_DIR)/bin/riscv64-unknown-elf-g++"
|
||||
premake.gcc.ar = "$(RISCV_DIR)/bin/riscv64-unknown-elf-ar"
|
||||
premake.gcc.cc = "$(FREEDOM_E_SDK)/toolchain/bin/riscv32-unknown-elf-gcc"
|
||||
premake.gcc.cxx = "$(FREEDOM_E_SDK)/toolchain/bin/riscv32-unknown-elf-g++"
|
||||
premake.gcc.ar = "$(FREEDOM_E_SDK)/toolchain/bin/riscv32-unknown-elf-ar"
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-riscv"))
|
||||
|
||||
end
|
||||
@@ -1307,13 +1308,18 @@ function toolchain(_buildDir, _libDir)
|
||||
configuration { "riscv" }
|
||||
targetdir (path.join(_buildDir, "riscv/bin"))
|
||||
objdir (path.join(_buildDir, "riscv/obj"))
|
||||
defines {
|
||||
"__BSD_VISIBLE",
|
||||
"__MISC_VISIBLE",
|
||||
}
|
||||
includedirs {
|
||||
"$(RISCV_DIR)/sysroot/usr/include",
|
||||
"$(FREEDOM_E_SDK)/toolchain/riscv32-unknown-elf/include",
|
||||
path.join(bxDir, "include/compat/riscv"),
|
||||
}
|
||||
buildoptions {
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
"--sysroot=$(RISCV_DIR)/sysroot",
|
||||
"--sysroot=$(FREEDOM_E_SDK)/toolchain/riscv32-unknown-elf",
|
||||
}
|
||||
buildoptions_cpp {
|
||||
"-std=c++11",
|
||||
|
||||
Reference in New Issue
Block a user