aboutsummaryrefslogtreecommitdiffstats
path: root/community/rust/alpine-target.patch
diff options
context:
space:
mode:
authorRasmus Thomsen <oss@cogitri.dev>2019-07-07 22:34:53 +0200
committerLeo <thinkabit.ukim@gmail.com>2019-08-30 02:59:13 -0300
commit6c8381ba967cd3842484965f3f7c1200a42a5539 (patch)
treef2f504337d74d67be7ecd204e8d3ec531139b602 /community/rust/alpine-target.patch
parent7184ba0dd972247e83d1e0204c1f43c247ad84e5 (diff)
downloadaports-6c8381ba967cd3842484965f3f7c1200a42a5539.tar.bz2
aports-6c8381ba967cd3842484965f3f7c1200a42a5539.tar.xz
community/rust: upgrade to 1.37.0, enable on aarch64&x86 again
Use upstream triplets for now, rust doesn't seem to want to work with our triplets... See https://github.com/rust-lang/rust/issues/62447
Diffstat (limited to 'community/rust/alpine-target.patch')
-rw-r--r--community/rust/alpine-target.patch278
1 files changed, 74 insertions, 204 deletions
diff --git a/community/rust/alpine-target.patch b/community/rust/alpine-target.patch
index 6b8f9da678..ea1113247f 100644
--- a/community/rust/alpine-target.patch
+++ b/community/rust/alpine-target.patch
@@ -1,4 +1,4 @@
-From: Shiz <hi@shiz.me>, updated by Rasmus Thomsen <oss@cogitri.dev> on 6th of July 2019
+From: Shiz <hi@shiz.me>, updated by Rasmus Thomsen <oss@cogitri.dev> on 28th of July 2019
Date: Thu, 20 Aug 2017 01:52:36 +0200
Last-Updated: Sat, 28 Oct 2017 20:23:00 +0200
Subject: [PATCH] Add Alpine targets
@@ -23,229 +23,99 @@ and distribution-specific quirks instead of polluting the main musl target of
("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
--- /dev/null
-+++ b/src/librustc_target/spec/i586_alpine_linux_musl.rs
-@@ -0,0 +1,35 @@
-+// Copyright 2017 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 crate::spec::{LinkerFlavor, Target, TargetResult};
++++ b/src/librustc_target/spec/aarch64_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
-+ let mut base = super::linux_musl_base::opts();
-+ base.cpu = "pentium4".to_string();
-+ base.max_atomic_width = Some(64);
-+ base.stack_probes = true;
-+ base.crt_static_default = false;
-+ base.static_position_independent_executables = true;
-+ base.need_rpath = true;
-+
-+ Ok(Target {
-+ llvm_target: "i586-alpine-linux-musl".to_string(),
-+ target_endian: "little".to_string(),
-+ target_pointer_width: "32".to_string(),
-+ target_c_int_width: "32".to_string(),
-+ data_layout: "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128".to_string(),
-+ arch: "x86".to_string(),
-+ target_os: "linux".to_string(),
-+ target_env: "musl".to_string(),
-+ target_vendor: "alpine".to_string(),
-+ linker_flavor: LinkerFlavor::Gcc,
-+ options: base,
-+ })
++ let mut base = super::aarch64_unknown_linux_musl::target()?;
++
++ base.llvm_target = "aarch64-alpine-linux-musl".to_string();
++ base.target_vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ Ok(base)
+}
--- /dev/null
-+++ b/src/librustc_target/spec/x86_64_alpine_linux_musl.rs
-@@ -0,0 +1,35 @@
-+// Copyright 2017 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 crate::spec::{LinkerFlavor, Target, TargetResult};
++++ b/src/librustc_target/spec/armv6_alpine_linux_musleabihf.rs
+@@ -0,0 +1,13 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
-+ let mut base = super::linux_musl_base::opts();
-+ base.cpu = "x86-64".to_string();
-+ base.max_atomic_width = Some(64);
-+ base.stack_probes = true;
-+ base.crt_static_default = false;
-+ base.static_position_independent_executables = true;
-+ base.need_rpath = true;
-+
-+ Ok(Target {
-+ llvm_target: "x86_64-alpine-linux-musl".to_string(),
-+ target_endian: "little".to_string(),
-+ target_pointer_width: "64".to_string(),
-+ target_c_int_width: "32".to_string(),
-+ data_layout: "e-m:e-i64:64-f80:128-n8:16:32:64-S128".to_string(),
-+ arch: "x86_64".to_string(),
-+ target_os: "linux".to_string(),
-+ target_env: "musl".to_string(),
-+ target_vendor: "alpine".to_string(),
-+ linker_flavor: LinkerFlavor::Gcc,
-+ options: base,
-+ })
++ let mut base = super::arm_unknown_linux_musleabihf::target()?;
++
++ base.llvm_target = "armv6-alpine-linux-musleabihf".to_string();
++ base.target_vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ Ok(base)
+}
--- /dev/null
-+++ b/src/librustc_target/spec/aarch64_alpine_linux_musl.rs
-@@ -0,0 +1,36 @@
-+// Copyright 2017 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 crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
++++ b/src/librustc_target/spec/armv7_alpine_linux_musleabihf.rs
+@@ -0,0 +1,13 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
-+ let mut base = super::linux_musl_base::opts();
-+ base.max_atomic_width = Some(128);
-+ base.crt_static_default = false;
-+ base.static_position_independent_executables = true;
-+ base.need_rpath = true;
-+
-+ Ok(Target {
-+ llvm_target: "aarch64-alpine-linux-musl".to_string(),
-+ target_endian: "little".to_string(),
-+ target_pointer_width: "64".to_string(),
-+ target_c_int_width: "32".to_string(),
-+ data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(),
-+ arch: "aarch64".to_string(),
-+ target_os: "linux".to_string(),
-+ target_env: "musl".to_string(),
-+ target_vendor: "alpine".to_string(),
-+ linker_flavor: LinkerFlavor::Gcc,
-+ options: TargetOptions {
-+ abi_blacklist: super::arm_base::abi_blacklist(),
-+ .. base
-+ },
-+ })
++ let mut base = super::armv7_unknown_linux_musleabihf::target()?;
++
++ base.llvm_target = "armv7-alpine-linux-musleabihf".to_string();
++ base.target_vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ Ok(base)
+}
--- /dev/null
-+++ b/src/librustc_target/spec/armv6_alpine_linux_musleabihf.rs
-@@ -0,0 +1,41 @@
-+// Copyright 2017 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 crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
++++ b/src/librustc_target/spec/i586_alpine_linux_musl.rs
+@@ -0,0 +1,14 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
-+ let mut base = super::linux_musl_base::opts();
-+
-+ // Most of these settings are copied from the arm_unknown_linux_gnueabihf
-+ // target.
-+ base.features = "+v6,+vfp2".to_string();
-+ base.max_atomic_width = Some(64);
-+ base.crt_static_default = false;
-+ base.static_position_independent_executables = true;
-+ base.need_rpath = true;
-+
-+ Ok(Target {
-+ llvm_target: "arm-alpine-linux-musleabihf".to_string(),
-+ target_endian: "little".to_string(),
-+ target_pointer_width: "32".to_string(),
-+ target_c_int_width: "32".to_string(),
-+ data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
-+ arch: "arm".to_string(),
-+ target_os: "linux".to_string(),
-+ target_env: "musl".to_string(),
-+ target_vendor: "alpine".to_string(),
-+ linker_flavor: LinkerFlavor::Gcc,
-+ options: TargetOptions {
-+ abi_blacklist: super::arm_base::abi_blacklist(),
-+ target_mcount: "\u{1}mcount".to_string(),
-+ .. base
-+ },
-+ })
++ let mut base = super::i686_unknown_linux_musl::target()?;
++
++ base.options.cpu = "pentium4".to_string();
++ base.llvm_target = "i586-alpine-linux-musl".to_string();
++ base.target_vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ Ok(base)
+}
--- /dev/null
-+++ b/src/librustc_target/spec/armv7_alpine_linux_musleabihf.rs
-@@ -0,0 +1,34 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
-+
-+// This target is for musl Linux on ARMv7 without thumb-mode or NEON.
++++ b/src/librustc_target/spec/powerpc64le_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
-+ let mut base = super::linux_musl_base::opts();
-+ base.crt_static_default = false;
-+ base.static_position_independent_executables = true;
-+ base.need_rpath = true;
-+
-+ Ok(Target {
-+ llvm_target: "armv7-unknown-linux-muslabihf".to_string(),
-+ target_endian: "little".to_string(),
-+ target_pointer_width: "32".to_string(),
-+ target_c_int_width: "32".to_string(),
-+ data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
-+ arch: "arm".to_string(),
-+ target_os: "linux".to_string(),
-+ target_env: "musl".to_string(),
-+ target_vendor: "alpine".to_string(),
-+ linker_flavor: LinkerFlavor::Gcc,
-+
-+ // Most of these settings are copied from the armv7_unknown_linux_gnueabihf
-+ // target.
-+ options: TargetOptions {
-+ features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(),
-+ cpu: "generic".to_string(),
-+ max_atomic_width: Some(64),
-+ abi_blacklist: super::arm_base::abi_blacklist(),
-+ target_mcount: "\u{1}mcount".to_string(),
-+ .. base
-+ }
-+ })
++ let mut base = super::powerpc64le_unknown_linux_musl::target()?;
++
++ base.llvm_target = "powerpc64le-alpine-linux-musl".to_string();
++ base.target_vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ Ok(base)
+}
--- /dev/null
-+++ b/src/librustc_target/spec/powerpc64le_alpine_linux_musl.rs
-@@ -0,0 +1,28 @@
-+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
++++ b/src/librustc_target/spec/x86_64_alpine_linux_musl.rs
+@@ -0,0 +1,13 @@
++use crate::spec::TargetResult;
+
+pub fn target() -> TargetResult {
-+ let mut base = super::linux_musl_base::opts();
-+ base.cpu = "ppc64le".to_string();
-+ base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
-+ base.max_atomic_width = Some(64);
-+ base.crt_static_default = false;
-+ base.static_position_independent_executables = true;
-+ base.need_rpath = true;
-+
-+ Ok(Target {
-+ llvm_target: "powerpc64le-alpine-linux-musl".to_string(),
-+ target_endian: "little".to_string(),
-+ target_pointer_width: "64".to_string(),
-+ target_c_int_width: "32".to_string(),
-+ data_layout: "e-m:e-i64:64-n32:64".to_string(),
-+ arch: "powerpc64".to_string(),
-+ target_os: "linux".to_string(),
-+ target_env: "musl".to_string(),
-+ target_vendor: "alpine".to_string(),
-+ linker_flavor: LinkerFlavor::Gcc,
-+ options: TargetOptions {
-+ target_mcount: "_mcount".to_string(),
-+ .. base
-+ },
-+ })
++ let mut base = super::x86_64_unknown_linux_musl::target()?;
++
++ base.llvm_target = "x86_64-alpine-linux-musl".to_string();
++ base.target_vendor = "alpine".to_string();
++ base.options.crt_static_default = false;
++ base.options.static_position_independent_executables = true;
++ base.options.need_rpath = true;
++
++ Ok(base)
+}