Hi everyone,
I am working actually on my Linux distribution. I did a package manager able to build a Linux system completely from scratch from the source.
I am just facing a small problem. I need to compile rustc for a custom target. The target I have on the system is: x86_64-horizon-linux-gnu
How should I proceed ? I guess I need to change something in the file config.toml, but after lot of try, I don't get the result I want...
This is the script called by my package manager (even you don't know the API, should be easy to understand):
class Target < ISM::Software
def prepare
super
configData = <<-CODE
changelog-seen = 2
[llvm]
targets = "X86"
link-shared = true
[build]
full-bootstrap = true
docs = false
extended = true
locked-deps = true
tools = ["cargo", "clippy", "rustdoc", "rustfmt"]
vendor = true
[install]
prefix = "/usr"
docdir = "share/doc/rustc-1.71.1"
[rust]
channel = "stable"
[target.#{Ism.settings.systemTarget}]
llvm-config = "/usr/bin/llvm-config"
CODE
fileWriteData("#{buildDirectoryPath}/config.toml",configData)
end
def build
super
runPythonCommand( arguments: "./x.py build",
path: buildDirectoryPath,
environment: {"LIBSSH2_SYS_USE_PKG_CONFIG" => "1"})
end
def prepareInstallation
super
runPythonCommand( arguments: "./x.py install",
path: buildDirectoryPath,
environment: { "DESTDIR" => "#{builtSoftwareDirectoryPath}#{Ism.settings.rootPath}",
"LIBSSH2_SYS_USE_PKG_CONFIG" => "1"})
deleteAllFilesRecursivelyFinishing( path: "#{builtSoftwareDirectoryPath}#{Ism.settings.rootPath}",
extensions: ["old"])
end
end
This is my project page by the way: GitHub - Fulgurance/ISM: Ingenius System Manager
(Horizon will be my linux system name)