mirror of
https://github.com/bkaradzic/bx.git
synced 2026-02-17 20:52:37 +01:00
Added RISC-V.
This commit is contained in:
@@ -37,6 +37,7 @@ function toolchain(_buildDir, _libDir)
|
||||
{ "ps4", "PS4" },
|
||||
{ "qnx-arm", "QNX/Blackberry - ARM" },
|
||||
{ "rpi", "RaspberryPi" },
|
||||
{ "riscv", "RISC-V" },
|
||||
},
|
||||
}
|
||||
|
||||
@@ -336,6 +337,13 @@ function toolchain(_buildDir, _libDir)
|
||||
|
||||
elseif "rpi" == _OPTIONS["gcc"] then
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-rpi"))
|
||||
|
||||
elseif "riscv" == _OPTIONS["gcc"] then
|
||||
premake.gcc.cc = "/opt/riscv/bin/riscv64-unknown-elf-gcc"
|
||||
premake.gcc.cxx = "/opt/riscv/bin/riscv64-unknown-elf-g++"
|
||||
premake.gcc.ar = "/opt/riscv/bin/riscv64-unknown-elf-ar"
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-riscv"))
|
||||
|
||||
end
|
||||
elseif _ACTION == "vs2012" or _ACTION == "vs2013" or _ACTION == "vs2015" then
|
||||
|
||||
@@ -1128,6 +1136,17 @@ function toolchain(_buildDir, _libDir)
|
||||
"-Wl,--gc-sections",
|
||||
}
|
||||
|
||||
configuration { "riscv" }
|
||||
targetdir (path.join(_buildDir, "riscv/bin"))
|
||||
objdir (path.join(_buildDir, "riscv/obj"))
|
||||
buildoptions {
|
||||
"-Wunused-value",
|
||||
"-Wundef",
|
||||
}
|
||||
buildoptions_cpp {
|
||||
"-std=c++0x",
|
||||
}
|
||||
|
||||
configuration {} -- reset configuration
|
||||
|
||||
return true
|
||||
|
||||
@@ -15,7 +15,7 @@ project "UnitTest++"
|
||||
"../3rdparty/UnitTest++/src/*.h",
|
||||
}
|
||||
|
||||
configuration { "linux or osx or android-* or *nacl* or ps4" }
|
||||
configuration { "linux or osx or android-* or *nacl* or ps4 or rpi or riscv" }
|
||||
files {
|
||||
"../3rdparty/UnitTest++/src/Posix/**.cpp",
|
||||
"../3rdparty/UnitTest++/src/Posix/**.h",
|
||||
|
||||
Reference in New Issue
Block a user