Skip to content

Commit d985de1

Browse files
committed
add musl-root support for mips targets
1 parent dab47a0 commit d985de1

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

configure

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,8 @@ valopt musl-root-i686 "" "i686-unknown-linux-musl install directory"
486486
valopt musl-root-arm "" "arm-unknown-linux-musleabi install directory"
487487
valopt musl-root-armhf "" "arm-unknown-linux-musleabihf install directory"
488488
valopt musl-root-armv7 "" "armv7-unknown-linux-musleabihf install directory"
489+
valopt musl-root-mips "" "mips-unknown-linux-musl install directory"
490+
valopt musl-root-mipsel "" "mipsel-unknown-linux-musl install directory"
489491
valopt extra-filename "" "Additional data that is hashed and passed to the -C extra-filename flag"
490492
valopt qemu-armhf-rootfs "" "rootfs in qemu testing, you probably don't want to use this"
491493

src/bootstrap/config.rs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,18 @@ impl Config {
511511
.or_insert(Target::default());
512512
target.musl_root = Some(parse_configure_path(value));
513513
}
514+
"CFG_MUSL_ROOT_MIPS" if value.len() > 0 => {
515+
let target = "mips-unknown-linux-musl".to_string();
516+
let target = self.target_config.entry(target)
517+
.or_insert(Target::default());
518+
target.musl_root = Some(parse_configure_path(value));
519+
}
520+
"CFG_MUSL_ROOT_MIPSEL" if value.len() > 0 => {
521+
let target = "mipsel-unknown-linux-musl".to_string();
522+
let target = self.target_config.entry(target)
523+
.or_insert(Target::default());
524+
target.musl_root = Some(parse_configure_path(value));
525+
}
514526
"CFG_DEFAULT_AR" if value.len() > 0 => {
515527
self.rustc_default_ar = Some(value.to_string());
516528
}

src/ci/docker/cross/Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,7 @@ ENV RUST_CONFIGURE_ARGS \
7878
--target=$TARGETS \
7979
--musl-root-arm=/usr/local/arm-linux-musleabi \
8080
--musl-root-armhf=/usr/local/arm-linux-musleabihf \
81-
--musl-root-armv7=/usr/local/armv7-linux-musleabihf
81+
--musl-root-armv7=/usr/local/armv7-linux-musleabihf \
82+
--musl-root-mips=/usr/local/mips-linux-musl \
83+
--musl-root-mipsel=/usr/local/mipsel-linux-musl
8284
ENV SCRIPT python2.7 ../x.py dist --target $TARGETS

0 commit comments

Comments
 (0)