|
@@ -39,6 +39,7 @@ function toolchain(_buildDir, _libDir)
|
|
|
{ "pnacl", "Native Client - PNaCl" },
|
|
{ "pnacl", "Native Client - PNaCl" },
|
|
|
{ "orbis", "Orbis" },
|
|
{ "orbis", "Orbis" },
|
|
|
{ "qnx-arm", "QNX/Blackberry - ARM" },
|
|
{ "qnx-arm", "QNX/Blackberry - ARM" },
|
|
|
|
|
+ { "riscv", "RISC-V" },
|
|
|
{ "rpi", "RaspberryPi" },
|
|
{ "rpi", "RaspberryPi" },
|
|
|
},
|
|
},
|
|
|
}
|
|
}
|
|
@@ -406,9 +407,9 @@ function toolchain(_buildDir, _libDir)
|
|
|
location (path.join(_buildDir, "projects", _ACTION .. "-rpi"))
|
|
location (path.join(_buildDir, "projects", _ACTION .. "-rpi"))
|
|
|
|
|
|
|
|
elseif "riscv" == _OPTIONS["gcc"] then
|
|
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"))
|
|
location (path.join(_buildDir, "projects", _ACTION .. "-riscv"))
|
|
|
|
|
|
|
|
end
|
|
end
|
|
@@ -1307,13 +1308,18 @@ function toolchain(_buildDir, _libDir)
|
|
|
configuration { "riscv" }
|
|
configuration { "riscv" }
|
|
|
targetdir (path.join(_buildDir, "riscv/bin"))
|
|
targetdir (path.join(_buildDir, "riscv/bin"))
|
|
|
objdir (path.join(_buildDir, "riscv/obj"))
|
|
objdir (path.join(_buildDir, "riscv/obj"))
|
|
|
|
|
+ defines {
|
|
|
|
|
+ "__BSD_VISIBLE",
|
|
|
|
|
+ "__MISC_VISIBLE",
|
|
|
|
|
+ }
|
|
|
includedirs {
|
|
includedirs {
|
|
|
- "$(RISCV_DIR)/sysroot/usr/include",
|
|
|
|
|
|
|
+ "$(FREEDOM_E_SDK)/toolchain/riscv32-unknown-elf/include",
|
|
|
|
|
+ path.join(bxDir, "include/compat/riscv"),
|
|
|
}
|
|
}
|
|
|
buildoptions {
|
|
buildoptions {
|
|
|
"-Wunused-value",
|
|
"-Wunused-value",
|
|
|
"-Wundef",
|
|
"-Wundef",
|
|
|
- "--sysroot=$(RISCV_DIR)/sysroot",
|
|
|
|
|
|
|
+ "--sysroot=$(FREEDOM_E_SDK)/toolchain/riscv32-unknown-elf",
|
|
|
}
|
|
}
|
|
|
buildoptions_cpp {
|
|
buildoptions_cpp {
|
|
|
"-std=c++11",
|
|
"-std=c++11",
|