Skip to content
Snippets Groups Projects
Commit d0e53e05 authored by Jeremy Soller's avatar Jeremy Soller
Browse files

Merge branch 'multitarget' into 'master'

Package all the toolchains in the docker image

See merge request !27
parents 4a89ed32 6c9ded53
No related branches found
No related tags found
1 merge request!27Package all the toolchains in the docker image
...@@ -11,7 +11,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \ ...@@ -11,7 +11,8 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
libfuse-dev \ libfuse-dev \
pkg-config \ pkg-config \
qemu-system-x86 \ qemu-system-x86 \
rsync rsync \
nasm
# Install rust # Install rust
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | \
...@@ -25,7 +26,10 @@ COPY . /root/redoxer ...@@ -25,7 +26,10 @@ COPY . /root/redoxer
RUN cargo install --path /root/redoxer RUN cargo install --path /root/redoxer
# Install redoxer toolchain # Install redoxer toolchain
RUN redoxer toolchain RUN TARGET=x86_64-unknown-redox redoxer toolchain && \
TARGET=i686-unknown-redox redoxer toolchain && \
TARGET=aarch64-unknown-redox redoxer toolchain && \
TARGET=riscv64gc-unknown-redox redoxer toolchain
# Ensure redoxer exec is working # Ensure redoxer exec is working
RUN redoxer exec true RUN redoxer exec true
...@@ -29,6 +29,7 @@ pub fn command<S: AsRef<ffi::OsStr>>(program: S) -> io::Result<process::Command> ...@@ -29,6 +29,7 @@ pub fn command<S: AsRef<ffi::OsStr>>(program: S) -> io::Result<process::Command>
command.env("RUSTUP_TOOLCHAIN", &toolchain_dir); command.env("RUSTUP_TOOLCHAIN", &toolchain_dir);
command.env("TARGET", target()); command.env("TARGET", target());
command.env("GNU_TARGET", gnu_target()); command.env("GNU_TARGET", gnu_target());
command.env("CFLAGS_riscv64gc_unknown_redox", "-march=rv64gc -mabi=lp64d");
Ok(command) Ok(command)
} }
......
...@@ -27,6 +27,7 @@ fn redoxer_dir() -> path::PathBuf { ...@@ -27,6 +27,7 @@ fn redoxer_dir() -> path::PathBuf {
dirs::home_dir() dirs::home_dir()
.unwrap_or(path::PathBuf::from(".")) .unwrap_or(path::PathBuf::from("."))
.join(".redoxer") .join(".redoxer")
.join(target())
} }
fn status_error(status: process::ExitStatus) -> io::Result<()> { fn status_error(status: process::ExitStatus) -> io::Result<()> {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment