Add i586-unknown-linux-musl target
This commit is contained in:
parent
ee220daca3
commit
882cd3cf0b
@ -126,7 +126,7 @@ matrix:
|
||||
if: branch = auto
|
||||
- env: IMAGE=dist-armv7-linux DEPLOY=1
|
||||
if: branch = auto
|
||||
- env: IMAGE=dist-i586-gnu-i686-musl DEPLOY=1
|
||||
- env: IMAGE=dist-i586-gnu-i586-i686-musl DEPLOY=1
|
||||
if: branch = auto
|
||||
- env: IMAGE=dist-i686-freebsd DEPLOY=1
|
||||
if: branch = auto
|
||||
|
@ -108,6 +108,8 @@ v("musl-root", "target.x86_64-unknown-linux-musl.musl-root",
|
||||
"MUSL root installation directory (deprecated)")
|
||||
v("musl-root-x86_64", "target.x86_64-unknown-linux-musl.musl-root",
|
||||
"x86_64-unknown-linux-musl install directory")
|
||||
v("musl-root-i586", "target.i586-unknown-linux-musl.musl-root",
|
||||
"i586-unknown-linux-musl install directory")
|
||||
v("musl-root-i686", "target.i686-unknown-linux-musl.musl-root",
|
||||
"i686-unknown-linux-musl install directory")
|
||||
v("musl-root-arm", "target.arm-unknown-linux-musleabi.musl-root",
|
||||
|
@ -429,6 +429,8 @@ impl Step for Openssl {
|
||||
"arm-unknown-linux-gnueabihf" => "linux-armv4",
|
||||
"armv7-linux-androideabi" => "android-armv7",
|
||||
"armv7-unknown-linux-gnueabihf" => "linux-armv4",
|
||||
"i586-unknown-linux-gnu" => "linux-elf",
|
||||
"i586-unknown-linux-musl" => "linux-elf",
|
||||
"i686-apple-darwin" => "darwin-i386-cc",
|
||||
"i686-linux-android" => "android-x86",
|
||||
"i686-unknown-freebsd" => "BSD-x86-elf",
|
||||
|
@ -21,6 +21,9 @@ COPY scripts/musl.sh /build/
|
||||
RUN CC=gcc CFLAGS="-m32 -fPIC -Wa,-mrelax-relocations=no" \
|
||||
CXX=g++ CXXFLAGS="-m32 -Wa,-mrelax-relocations=no" \
|
||||
bash musl.sh i686 --target=i686 && \
|
||||
CC=gcc CFLAGS="-march=pentium -m32 -fPIC -Wa,-mrelax-relocations=no" \
|
||||
CXX=g++ CXXFLAGS="-march=pentium -m32 -Wa,-mrelax-relocations=no" \
|
||||
bash musl.sh i586 --target=i586 && \
|
||||
rm -rf /build
|
||||
|
||||
COPY scripts/sccache.sh /scripts/
|
||||
@ -28,6 +31,7 @@ RUN sh /scripts/sccache.sh
|
||||
|
||||
ENV RUST_CONFIGURE_ARGS \
|
||||
--target=i686-unknown-linux-musl,i586-unknown-linux-gnu \
|
||||
--musl-root-i586=/musl-i586 \
|
||||
--musl-root-i686=/musl-i686 \
|
||||
--enable-extended
|
||||
|
||||
@ -38,12 +42,13 @@ ENV RUST_CONFIGURE_ARGS \
|
||||
# See: https://github.com/rust-lang/rust/issues/34978
|
||||
ENV CFLAGS_i686_unknown_linux_musl=-Wa,-mrelax-relocations=no
|
||||
ENV CFLAGS_i586_unknown_linux_gnu=-Wa,-mrelax-relocations=no
|
||||
# FIXME remove -Wl,-melf_i386 after cc is updated to include
|
||||
# https://github.com/alexcrichton/cc-rs/pull/281
|
||||
ENV CFLAGS_i586_unknown_linux_musl="-Wa,-mrelax-relocations=no -Wl,-melf_i386"
|
||||
|
||||
ENV TARGETS=i586-unknown-linux-gnu
|
||||
ENV TARGETS=$TARGETS,i686-unknown-linux-musl
|
||||
|
||||
ENV SCRIPT \
|
||||
python2.7 ../x.py test \
|
||||
--target i686-unknown-linux-musl \
|
||||
--target i586-unknown-linux-gnu \
|
||||
&& \
|
||||
python2.7 ../x.py dist \
|
||||
--target i686-unknown-linux-musl \
|
||||
--target i586-unknown-linux-gnu
|
||||
python2.7 ../x.py test --target $TARGETS && \
|
||||
python2.7 ../x.py dist --target $TARGETS,i586-unknown-linux-musl
|
@ -39,7 +39,7 @@ fi
|
||||
|
||||
cd $MUSL
|
||||
./configure --disable-shared --prefix=/musl-$TAG $@
|
||||
if [ "$TAG" = "i686" ]; then
|
||||
if [ "$TAG" = "i586" -o "$TAG" = "i686" ]; then
|
||||
hide_output make -j$(nproc) AR=ar RANLIB=ranlib
|
||||
else
|
||||
hide_output make -j$(nproc)
|
||||
|
18
src/librustc_back/target/i586_unknown_linux_musl.rs
Normal file
18
src/librustc_back/target/i586_unknown_linux_musl.rs
Normal file
@ -0,0 +1,18 @@
|
||||
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
|
||||
// file at the top-level directory of this distribution and at
|
||||
// http://rust-lang.org/COPYRIGHT.
|
||||
//
|
||||
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
||||
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
||||
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
use target::TargetResult;
|
||||
|
||||
pub fn target() -> TargetResult {
|
||||
let mut base = super::i686_unknown_linux_musl::target()?;
|
||||
base.options.cpu = "pentium".to_string();
|
||||
base.llvm_target = "i586-unknown-linux-musl".to_string();
|
||||
Ok(base)
|
||||
}
|
@ -147,6 +147,7 @@ supported_targets! {
|
||||
("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
|
||||
("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
|
||||
("s390x-unknown-linux-gnu", s390x_unknown_linux_gnu),
|
||||
("sparc64-unknown-linux-gnu", sparc64_unknown_linux_gnu),
|
||||
("arm-unknown-linux-gnueabi", arm_unknown_linux_gnueabi),
|
||||
("arm-unknown-linux-gnueabihf", arm_unknown_linux_gnueabihf),
|
||||
("arm-unknown-linux-musleabi", arm_unknown_linux_musleabi),
|
||||
@ -156,16 +157,17 @@ supported_targets! {
|
||||
("armv7-unknown-linux-gnueabihf", armv7_unknown_linux_gnueabihf),
|
||||
("armv7-unknown-linux-musleabihf", armv7_unknown_linux_musleabihf),
|
||||
("aarch64-unknown-linux-gnu", aarch64_unknown_linux_gnu),
|
||||
|
||||
("aarch64-unknown-linux-musl", aarch64_unknown_linux_musl),
|
||||
("x86_64-unknown-linux-musl", x86_64_unknown_linux_musl),
|
||||
("i686-unknown-linux-musl", i686_unknown_linux_musl),
|
||||
("i586-unknown-linux-musl", i586_unknown_linux_musl),
|
||||
("mips-unknown-linux-musl", mips_unknown_linux_musl),
|
||||
("mipsel-unknown-linux-musl", mipsel_unknown_linux_musl),
|
||||
|
||||
("mips-unknown-linux-uclibc", mips_unknown_linux_uclibc),
|
||||
("mipsel-unknown-linux-uclibc", mipsel_unknown_linux_uclibc),
|
||||
|
||||
("sparc64-unknown-linux-gnu", sparc64_unknown_linux_gnu),
|
||||
|
||||
("i686-linux-android", i686_linux_android),
|
||||
("x86_64-linux-android", x86_64_linux_android),
|
||||
("arm-linux-androideabi", arm_linux_androideabi),
|
||||
|
@ -67,6 +67,7 @@ static TARGETS: &'static [&'static str] = &[
|
||||
"i386-apple-ios",
|
||||
"i586-pc-windows-msvc",
|
||||
"i586-unknown-linux-gnu",
|
||||
"i586-unknown-linux-musl",
|
||||
"i686-apple-darwin",
|
||||
"i686-linux-android",
|
||||
"i686-pc-windows-gnu",
|
||||
|
Loading…
x
Reference in New Issue
Block a user