Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • tdptheking/packages
  • yuriy-chumak/packages
  • peter/packages
  • andri0500/packages
  • ivmai77/packages
  • jonesv/packages
  • systemdlete/packages
  • Osvaldorino/packages
  • lubod/packages
  • Bdragon/packages
  • ska/packages
  • Le1gh/packages
  • dimitsos/packages
  • arcayr/packages
  • alicela1n/packages
  • djt/packages
  • dusxmt/packages
  • lstarnes/packages
  • smaeul/packages
  • krazier/packages
  • koorogi/packages
  • shizonic/packages
  • gavinhoward/packages
  • sroracle/packages
  • adelie/packages
  • alyx/packages
  • sonicrules1234/packages
  • Rsamoraj11/packages
  • ndowens04/packages
  • jogness/packages
  • bunny/packages
  • rmccask/packages
  • zx2c4/packages
  • ndowens/packages
  • CyberLeo/packages
  • paper/packages
  • Ermine/packages
  • zephy/packages
  • ashquarky/adelie-packages
  • mahiuchun/packages
  • TobiX/packages
  • firasuke/packages
42 results
Show changes
Showing
with 1288 additions and 0 deletions
Upstream: https://github.com/llvm/llvm-project/issues/94726
diff --git a/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h b/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h
index 1376b06bef6f..62ea03cc9760 100644
--- a/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h
+++ b/lib/Target/M68k/MCTargetDesc/M68kBaseInfo.h
@@ -85,9 +85,16 @@ template <typename value_t> value_t swapWord(value_t Val) {
Val = support::endian::byte_swap(Val, llvm::endianness::big);
value_t NewVal = 0;
for (unsigned i = 0U; i != NumWords; ++i) {
- uint16_t Part = (Val >> (i * 16)) & 0xFFFF;
- Part = support::endian::byte_swap(Part, llvm::endianness::big);
- NewVal |= (Part << (i * 16));
+ if (llvm::endianness::native == llvm::endianness::big) {
+ uint16_t Lo = (Val >> (i * 16)) & 0xFFFF;
+ NewVal |= (Lo << (++i * 16));
+ uint16_t Hi = (Val >> (++i * 16)) & 0xFFFF;
+ NewVal |= (Hi << ((i - 1) * 16));
+ } else {
+ uint16_t Part = (Val >> (i * 16)) & 0xFFFF;
+ Part = support::endian::byte_swap(Part, llvm::endianness::big);
+ NewVal |= (Part << (i * 16));
+ }
}
return NewVal;
}
Use integer offset math instead of pointer math to determine load
command bounds.
Upstream-URL: https://github.com/llvm/llvm-project/issues/56746
--- llvm-14.0.6.src/lib/Object/MachOObjectFile.cpp.old 2022-06-22 16:46:24.000000000 +0000
+++ llvm-14.0.6.src/lib/Object/MachOObjectFile.cpp 2022-11-28 04:21:02.730211841 +0000
@@ -192,7 +192,8 @@
getLoadCommandInfo(const MachOObjectFile &Obj, const char *Ptr,
uint32_t LoadCommandIndex) {
if (auto CmdOrErr = getStructOrErr<MachO::load_command>(Obj, Ptr)) {
- if (CmdOrErr->cmdsize + Ptr > Obj.getData().end())
+ uint64_t Offset = Ptr - Obj.getData().begin();
+ if (CmdOrErr->cmdsize + Offset > Obj.getData().size())
return malformedError("load command " + Twine(LoadCommandIndex) +
" extends past end of file");
if (CmdOrErr->cmdsize < 8)
From 750d323a6060ad92c3d247f85d6555041f55b4a5 Mon Sep 17 00:00:00 2001
From: "A. Wilcox" <AWilcox@Wilcox-Tech.com>
Date: Thu, 4 Oct 2018 15:26:59 -0500
Subject: [PATCH] Add support for powerpc64-*-linux-musl targets
This patch ensures that 64-bit PowerPC musl targets use ELFv2 ABI on both
endians. It additionally adds a test that big endian PPC64 uses ELFv2 on
musl.
---
lib/Target/PowerPC/PPCTargetMachine.cpp | 4 ++++
test/CodeGen/PowerPC/ppc64-elf-abi.ll | 1 +
2 files changed, 5 insertions(+)
diff --git a/test/CodeGen/PowerPC/ppc64-elf-abi.ll b/test/CodeGen/PowerPC/ppc64-elf-abi.ll
index 1e17930304b..aa594b37b47 100644
--- a/test/CodeGen/PowerPC/ppc64-elf-abi.ll
+++ b/test/CodeGen/PowerPC/ppc64-elf-abi.ll
@@ -1,6 +1,7 @@
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv1
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-musl < %s | FileCheck %s -check-prefix=CHECK-ELFv2
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
--
2.18.0
Upstream: https://github.com/llvm/llvm-project/issues/95594
Ref: #1204
--- llvm/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h.old 2024-06-15 12:21:32.000000000 -0500
+++ llvm/include/llvm/ExecutionEngine/Orc/Shared/SimplePackedSerialization.h 2024-06-25 21:42:07.495284340 -0500
@@ -390,6 +390,8 @@
return Size;
}
+#pragma GCC push_options
+#pragma GCC optimize("no-tree-ch")
static bool serialize(SPSOutputBuffer &OB, const SequenceT &S) {
if (!SPSArgList<uint64_t>::serialize(OB, static_cast<uint64_t>(S.size())))
return false;
@@ -398,6 +400,7 @@
return false;
return true;
}
+#pragma GCC pop_options
static bool deserialize(SPSInputBuffer &IB, SequenceT &S) {
using TBSD = TrivialSPSSequenceDeserialization<SPSElementTagT, SequenceT>;
--- llvm-7.0.1.src/test/BugPoint/compile-custom.ll.py.old 2014-03-13 00:10:37.000000000 +0000
+++ llvm-7.0.1.src/test/BugPoint/compile-custom.ll.py 2019-03-10 03:48:48.600000000 +0000
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
from __future__ import print_function
--- llvm-14.0.4.src/lib/Analysis/TargetLibraryInfo.cpp.old 2022-05-24 22:02:58.000000000 +0000
+++ llvm-14.0.4.src/lib/Analysis/TargetLibraryInfo.cpp 2022-07-06 01:38:22.016862561 +0000
@@ -634,6 +634,13 @@
TLI.setUnavailable(LibFunc_statvfs64);
TLI.setUnavailable(LibFunc_tmpfile64);
+ // These functions are unavailable on musl.
+ if (T.isMusl()) {
+ TLI.setUnavailable(LibFunc_roundeven);
+ TLI.setUnavailable(LibFunc_roundevenf);
+ TLI.setUnavailable(LibFunc_roundevenl);
+ }
+
// Relaxed math functions are included in math-finite.h on Linux (GLIBC).
// Note that math-finite.h is no longer supported by top-of-tree GLIBC,
// so we keep these functions around just so that they're recognized by
--- llvm-14.0.4.src/test/Transforms/InstCombine/double-float-shrink-2.ll.old 2022-05-24 22:02:58.000000000 +0000
+++ llvm-14.0.4.src/test/Transforms/InstCombine/double-float-shrink-2.ll 2022-07-06 02:03:20.657791057 +0000
@@ -1,5 +1,5 @@
; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; REQUIRES: x86-registered-target,sparc-registered-target
-; RUN: opt < %s -passes=instcombine -S -mtriple "i386-pc-linux" | FileCheck %s --check-prefixes=CHECK,DOUBLE-4BYTE-ALIGN
+; RUN: opt < %s -passes=instcombine -S -mtriple "i386-pc-linux-gnu" | FileCheck %s --check-prefixes=CHECK,DOUBLE-4BYTE-ALIGN
; RUN: opt < %s -passes=instcombine -S -mtriple "i386-pc-win32" | FileCheck %s --check-prefixes=CHECK,DOUBLE-8BYTE-ALIGN
; RUN: opt < %s -passes=instcombine -S -mtriple "x86_64-pc-win32" | FileCheck %s --check-prefixes=CHECK,DOUBLE-8BYTE-ALIGN
--- llvm-14.0.4.src/test/ExecutionEngine/Interpreter/intrinsics.ll.old 2022-05-24 22:02:58.000000000 +0000
+++ llvm-14.0.4.src/test/ExecutionEngine/Interpreter/intrinsics.ll 2022-07-23 06:50:59.336665672 +0000
@@ -13,8 +13,8 @@
declare double @llvm.trunc.f64(double)
declare float @llvm.round.f32(float)
declare double @llvm.round.f64(double)
-declare float @llvm.roundeven.f32(float)
-declare double @llvm.roundeven.f64(double)
+;declare float @llvm.roundeven.f32(float)
+;declare double @llvm.roundeven.f64(double)
declare float @llvm.copysign.f32(float, float)
declare double @llvm.copysign.f64(double, double)
@@ -31,8 +31,8 @@
%trunc64 = call double @llvm.trunc.f64(double 0.000000e+00)
%round32 = call float @llvm.round.f32(float 0.000000e+00)
%round64 = call double @llvm.round.f64(double 0.000000e+00)
- %roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)
- %roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)
+ ;%roundeven32 = call float @llvm.roundeven.f32(float 0.000000e+00)
+ ;%roundeven64 = call double @llvm.roundeven.f64(double 0.000000e+00)
%copysign32 = call float @llvm.copysign.f32(float 0.000000e+00, float 0.000000e+00)
%copysign64 = call double @llvm.copysign.f64(double 0.000000e+00, double 0.000000e+00)
ret i32 0
From 1a5423cf2c7eb0784fcc9b789cdd271efbf43d45 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Fri, 8 Sep 2017 00:04:29 -0500
Subject: [PATCH 01/14] Fix LLVM build
---
src/bootstrap/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 3130dcc277b..c6ac4f9e636 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -957,7 +957,7 @@ fn cflags(&self, target: TargetSelection, which: GitRepo, c: CLang) -> Vec<Strin
.args()
.iter()
.map(|s| s.to_string_lossy().into_owned())
- .filter(|s| !s.starts_with("-O") && !s.starts_with("/O"))
+ .filter(|s| !s.starts_with("-O") && !s.starts_with("/O") && !s.starts_with("-static"))
.collect::<Vec<String>>();
// If we're compiling on macOS then we add a few unconditional flags
--
2.35.1
From 702ebc6e2283f69e8b024b2cf12899a2bbdf6e8b Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Wed, 10 Jan 2018 13:36:41 -0600
Subject: [PATCH 02/14] Fix linking to zlib when cross-compiling
---
compiler/rustc_llvm/build.rs | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/compiler/rustc_llvm/build.rs b/compiler/rustc_llvm/build.rs
index 3b6808d693f..4713f550a73 100644
--- a/compiler/rustc_llvm/build.rs
+++ b/compiler/rustc_llvm/build.rs
@@ -177,16 +177,15 @@ fn main() {
// of llvm-config, not the target that we're attempting to link.
let mut cmd = Command::new(&llvm_config);
cmd.arg(llvm_link_arg).arg("--libs");
+ cmd.arg("--system-libs");
+ cmd.args(&components);
- if !is_crossed {
- cmd.arg("--system-libs");
- } else if target.contains("windows-gnu") {
+ if target.contains("windows-gnu") {
println!("cargo:rustc-link-lib=shell32");
println!("cargo:rustc-link-lib=uuid");
} else if target.contains("netbsd") || target.contains("haiku") || target.contains("darwin") {
println!("cargo:rustc-link-lib=z");
}
- cmd.args(&components);
for lib in output(&mut cmd).split_whitespace() {
let name = if let Some(stripped) = lib.strip_prefix("-l") {
--
2.35.1
From 41ab14f51521d94673ddae78e91611a3e7197078 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 2 Dec 2017 17:25:44 -0600
Subject: [PATCH 03/14] Fix rustdoc when cross-compiling on musl
musl can't handle foreign-architecture libraries in LD_LIBRARY_PATH.
---
src/bootstrap/bin/rustdoc.rs | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/src/bootstrap/bin/rustdoc.rs b/src/bootstrap/bin/rustdoc.rs
index ad3800834b0..e19b589233e 100644
--- a/src/bootstrap/bin/rustdoc.rs
+++ b/src/bootstrap/bin/rustdoc.rs
@@ -22,14 +22,11 @@ fn main() {
Err(_) => 0,
};
- let mut dylib_path = dylib_path();
- dylib_path.insert(0, PathBuf::from(libdir.clone()));
-
let mut cmd = Command::new(rustdoc);
cmd.args(&args)
.arg("--sysroot")
.arg(&sysroot)
- .env(dylib_path_var(), env::join_paths(&dylib_path).unwrap());
+ .env(dylib_path_var(), PathBuf::from(libdir.clone()));
// Force all crates compiled by this compiler to (a) be unstable and (b)
// allow the `rustc_private` feature to link to other unstable crates
@@ -62,7 +59,7 @@ fn main() {
eprintln!(
"rustdoc command: {:?}={:?} {:?}",
dylib_path_var(),
- env::join_paths(&dylib_path).unwrap(),
+ PathBuf::from(libdir.clone()),
cmd,
);
eprintln!("sysroot: {:?}", sysroot);
--
2.35.1
From 53c4a9c8ab26e10d1790b5a85fa26058f4252e2d Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Fri, 8 Sep 2017 00:05:18 -0500
Subject: [PATCH 04/14] Use static native libraries when linking static
executables
On ELF targets like Linux, gcc/ld will create a dynamically-linked
executable without warning, even when passed `-static`, when asked to
link to a `.so`. Avoid this confusing and unintended behavior by always
using the static version of libraries when trying to link static
executables.
---
compiler/rustc_codegen_ssa/src/back/link.rs | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs
index 58e0667d678..93d8a6e8680 100644
--- a/compiler/rustc_codegen_ssa/src/back/link.rs
+++ b/compiler/rustc_codegen_ssa/src/back/link.rs
@@ -1833,7 +1833,7 @@ fn linker_with_args<'a, B: ArchiveBuilder<'a>>(
// external build system already has the native dependencies defined, and it
// will provide them to the linker itself.
if sess.opts.debugging_opts.link_native_libraries {
- add_upstream_native_libraries(cmd, sess, codegen_results);
+ add_upstream_native_libraries(cmd, sess, codegen_results, crate_type);
}
// Library linking above uses some global state for things like `-Bstatic`/`-Bdynamic` to make
@@ -2359,8 +2359,7 @@ fn add_dynamic_crate(cmd: &mut dyn Linker, sess: &Session, cratepath: &Path) {
}
}
-/// Link in all of our upstream crates' native dependencies. Remember that all of these upstream
-/// native dependencies are all non-static dependencies. We've got two cases then:
+/// Link in all of our upstream crates' native dependencies. We have two cases:
///
/// 1. The upstream crate is an rlib. In this case we *must* link in the native dependency because
/// the rlib is just an archive.
@@ -2378,6 +2377,7 @@ fn add_upstream_native_libraries(
cmd: &mut dyn Linker,
sess: &Session,
codegen_results: &CodegenResults,
+ crate_type: CrateType,
) {
let mut last = (NativeLibKind::Unspecified, None);
for &cnum in &codegen_results.crate_info.used_crates {
@@ -2398,7 +2398,19 @@ fn add_upstream_native_libraries(
NativeLibKind::Dylib { as_needed } => {
cmd.link_dylib(name, verbatim, as_needed.unwrap_or(true))
}
- NativeLibKind::Unspecified => cmd.link_dylib(name, verbatim, true),
+ NativeLibKind::Unspecified => {
+ // On some targets, like Linux, linking a static executable inhibits using
+ // dylibs at all. Force native libraries to be static, even if for example
+ // an upstream rlib was originally linked against a native shared library.
+ if crate_type == config::CrateType::Executable
+ && sess.crt_static(Some(crate_type))
+ && !sess.target.options.crt_static_allows_dylibs
+ {
+ cmd.link_staticlib(name, verbatim)
+ } else {
+ cmd.link_dylib(name, verbatim, true)
+ }
+ },
NativeLibKind::Framework { as_needed } => {
cmd.link_framework(name, as_needed.unwrap_or(true))
}
--
2.35.1
From 78ae73f09d07c847ede1dc683b8907f5bd5bd17f Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 9 Sep 2017 00:14:16 -0500
Subject: [PATCH 06/14] Prefer libgcc_eh over libunwind for musl
---
library/unwind/src/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/library/unwind/src/lib.rs b/library/unwind/src/lib.rs
index 079626f0fea..590fca0acfa 100644
--- a/library/unwind/src/lib.rs
+++ b/library/unwind/src/lib.rs
@@ -51,7 +51,7 @@
#[link(name = "unwind", cfg(not(target_feature = "crt-static")))]
extern "C" {}
} else {
- #[link(name = "unwind", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
+ #[link(name = "gcc_eh", kind = "static", modifiers = "-bundle", cfg(target_feature = "crt-static"))]
#[link(name = "gcc_s", cfg(not(target_feature = "crt-static")))]
extern "C" {}
}
--
2.35.1
From 976ff1e1bbdbb9c0c0a32a6a27238b51e6467f8f Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 3 Nov 2019 17:01:32 -0600
Subject: [PATCH 07/14] Link libssp_nonshared.a on all musl targets
---
compiler/rustc_target/src/spec/linux_musl_base.rs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs
index 9931578ba86..a1cece5733c 100644
--- a/compiler/rustc_target/src/spec/linux_musl_base.rs
+++ b/compiler/rustc_target/src/spec/linux_musl_base.rs
@@ -1,10 +1,13 @@
-use crate::spec::TargetOptions;
+use crate::spec::{LinkerFlavor, TargetOptions};
pub fn opts() -> TargetOptions {
let mut base = super::linux_base::opts();
base.env = "musl".to_string();
+ // libssp_nonshared.a is needed for __stack_chk_fail_local when using libc.so
+ base.post_link_args.insert(LinkerFlavor::Gcc, vec!["-lssp_nonshared".to_string()]);
+
// These targets statically link libc by default
base.crt_static_default = true;
--
2.35.1
From 26ba9c852ad73dcc0401b74534b34bf33d5b6444 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 7 Oct 2019 18:36:28 -0500
Subject: [PATCH 08/14] test/failed-doctest-output: Fix normalization
Otherwise we get:
1
2 running 2 tests
- test $DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
- test $DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
+ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - OtherStruct (line 20) ... FAILED
+ test src/rustc-1.38.0-src/$DIR/failed-doctest-output.rs - SomeStruct (line 10) ... FAILED
5
6 failures:
7
---
src/test/rustdoc-ui/failed-doctest-output.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/test/rustdoc-ui/failed-doctest-output.rs b/src/test/rustdoc-ui/failed-doctest-output.rs
index 92473b49e14..ed29b446aba 100644
--- a/src/test/rustdoc-ui/failed-doctest-output.rs
+++ b/src/test/rustdoc-ui/failed-doctest-output.rs
@@ -4,7 +4,7 @@
// compile-flags:--test --test-args --test-threads=1
// rustc-env:RUST_BACKTRACE=0
-// normalize-stdout-test: "src/test/rustdoc-ui" -> "$$DIR"
+// normalize-stdout-test: "[[:graph:]]*src/test/rustdoc-ui" -> "$$DIR"
// normalize-stdout-test "finished in \d+\.\d+s" -> "finished in $$TIME"
// failure-status: 101
--
2.35.1
From 765788107fca34a8fcedf03a8902932255ad01cb Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 01:32:20 +0000
Subject: [PATCH 09/14] test/sysroot-crates-are-unstable: Fix test when rpath
is disabled
Without this environment var, the test can't run rustc to find
the sysroot path.
---
.../run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
index 1e267fb9576..30c33c5c13d 100644
--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
@@ -1,2 +1,4 @@
+-include ../tools.mk
+
all:
- '$(PYTHON)' test.py
+ env '$(HOST_RPATH_ENV)' '$(PYTHON)' test.py
--
2.35.1
From 5f08947cef0556245748e5a3d0b9d1da926939ff Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 6 Oct 2018 04:01:48 +0000
Subject: [PATCH 10/14] test/use-extern-for-plugins: Don't assume multilib
---
src/test/run-make-fulldeps/use-extern-for-plugins/Makefile | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
index 838b1a2719b..94fa9f6d067 100644
--- a/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
+++ b/src/test/run-make-fulldeps/use-extern-for-plugins/Makefile
@@ -4,12 +4,7 @@
# ignore-openbsd
# ignore-sunos
-HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
-ifeq ($(findstring i686,$(HOST)),i686)
-TARGET := $(subst i686,x86_64,$(HOST))
-else
-TARGET := $(subst x86_64,i686,$(HOST))
-endif
+TARGET := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
all:
$(RUSTC) foo.rs -C extra-filename=-host
--
2.35.1
From b7ab3ecb6233472afdbb5247b4c48cc8f45ad8ac Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 16 Sep 2018 16:38:48 +0000
Subject: [PATCH 11/14] Ignore broken and non-applicable tests
c-link-to-rust-va-list-fn: unstable feature, broken on aarch64, #56475
env-funky-keys: can't handle LD_PRELOAD (e.g. sandbox)
long-linker-command-lines: takes >10 minutes to run (but still passes)
sysroot-crates-are-unstable: can't run rustc without RPATH
---
src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile | 2 ++
src/test/run-make-fulldeps/long-linker-command-lines/Makefile | 2 ++
src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile | 2 ++
src/test/ui/env-funky-keys.rs | 1 +
4 files changed, 7 insertions(+)
diff --git a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
index f124ca2ab61..363b18f0985 100644
--- a/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
+++ b/src/test/run-make-fulldeps/c-link-to-rust-va-list-fn/Makefile
@@ -1,3 +1,5 @@
+# ignore-aarch64
+
-include ../tools.mk
all:
diff --git a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
index 5876fbc94bc..5f167ece1a2 100644
--- a/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
+++ b/src/test/run-make-fulldeps/long-linker-command-lines/Makefile
@@ -1,3 +1,5 @@
+# ignore-test
+
-include ../tools.mk
all:
diff --git a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
index 30c33c5c13d..d733bb1c557 100644
--- a/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
+++ b/src/test/run-make-fulldeps/sysroot-crates-are-unstable/Makefile
@@ -1,3 +1,5 @@
+# ignore-test
+
-include ../tools.mk
all:
diff --git a/src/test/ui/env-funky-keys.rs b/src/test/ui/env-funky-keys.rs
index 4548d333947..00dd85244d8 100644
--- a/src/test/ui/env-funky-keys.rs
+++ b/src/test/ui/env-funky-keys.rs
@@ -1,6 +1,7 @@
// run-pass
// Ignore this test on Android, because it segfaults there.
+// ignore-test
// ignore-android
// ignore-windows
// ignore-emscripten no execve
--
2.35.1
From 74767e8d9cad131d8fb67054df8110065649e6dd Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 24 Sep 2018 23:42:23 +0000
Subject: [PATCH 12/14] Link stage 2 tools dynamically to libstd
---
src/bootstrap/builder.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index 0d387ff1e37..f3ecd9067d3 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -1639,7 +1639,7 @@ pub fn cargo(
// When we build Rust dylibs they're all intended for intermediate
// usage, so make sure we pass the -Cprefer-dynamic flag instead of
// linking all deps statically into the dylib.
- if matches!(mode, Mode::Std | Mode::Rustc) {
+ if matches!(mode, Mode::Std | Mode::Rustc | Mode::ToolRustc) {
rustflags.arg("-Cprefer-dynamic");
}
--
2.35.1
From 137de7f431c116721de728a121f0c38aa24f58b6 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 02:09:10 +0000
Subject: [PATCH 13/14] Move debugger scripts to /usr/share/rust
---
src/bootstrap/dist.rs | 2 +-
src/etc/rust-gdb | 2 +-
src/etc/rust-gdbgui | 2 +-
src/etc/rust-lldb | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index f5ae8103cb0..28c9f3c05bc 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -474,7 +474,7 @@ fn make_run(run: RunConfig<'_>) {
fn run(self, builder: &Builder<'_>) {
let host = self.host;
let sysroot = self.sysroot;
- let dst = sysroot.join("lib/rustlib/etc");
+ let dst = sysroot.join("share/rust");
t!(fs::create_dir_all(&dst));
let cp_debugger_script = |file: &str| {
builder.install(&builder.src.join("src/etc/").join(file), &dst, 0o644);
diff --git a/src/etc/rust-gdb b/src/etc/rust-gdb
index b950cea79ed..559bfe3f1f9 100755
--- a/src/etc/rust-gdb
+++ b/src/etc/rust-gdb
@@ -12,7 +12,7 @@ fi
# Find out where the pretty printer Python module is
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
# Run GDB with the additional arguments that load the pretty printers
# Set the environment variable `RUST_GDB` to overwrite the call to a
diff --git a/src/etc/rust-gdbgui b/src/etc/rust-gdbgui
index 9744913b686..8722acdcc52 100755
--- a/src/etc/rust-gdbgui
+++ b/src/etc/rust-gdbgui
@@ -41,7 +41,7 @@ fi
# Find out where the pretty printer Python module is
RUSTC_SYSROOT="$("$RUSTC" --print=sysroot)"
-GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/lib/rustlib/etc"
+GDB_PYTHON_MODULE_DIRECTORY="$RUSTC_SYSROOT/share/rust"
# Set the environment variable `RUST_GDB` to overwrite the call to a
# different/specific command (defaults to `gdb`).
diff --git a/src/etc/rust-lldb b/src/etc/rust-lldb
index bce72f1bad6..8abb0124527 100755
--- a/src/etc/rust-lldb
+++ b/src/etc/rust-lldb
@@ -30,8 +30,8 @@ EOF
fi
fi
-script_import="command script import \"$RUSTC_SYSROOT/lib/rustlib/etc/lldb_lookup.py\""
-commands_file="$RUSTC_SYSROOT/lib/rustlib/etc/lldb_commands"
+script_import="command script import \"$RUSTC_SYSROOT/share/rust/lldb_lookup.py\""
+commands_file="$RUSTC_SYSROOT/share/rust/lldb_commands"
# Call LLDB with the commands added to the argument list
exec "$lldb" --one-line-before-file "$script_import" --source-before-file "$commands_file" "$@"
--
2.35.1
From 7e50215a21b198c73fe575d28c847fd645c4ee40 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 02:29:06 +0000
Subject: [PATCH 14/14] Add foxkit target specs
---
.../src/spec/aarch64_foxkit_linux_musl.rs | 11 +++++++++++
.../src/spec/armv7_foxkit_linux_musleabihf.rs | 11 +++++++++++
.../rustc_target/src/spec/i586_foxkit_linux_musl.rs | 11 +++++++++++
compiler/rustc_target/src/spec/mod.rs | 7 +++++++
.../src/spec/powerpc64_foxkit_linux_musl.rs | 11 +++++++++++
.../src/spec/powerpc_foxkit_linux_musl.rs | 11 +++++++++++
.../rustc_target/src/spec/x86_64_foxkit_linux_musl.rs | 11 +++++++++++
7 files changed, 73 insertions(+)
create mode 100644 compiler/rustc_target/src/spec/aarch64_foxkit_linux_musl.rs
create mode 100644 compiler/rustc_target/src/spec/armv7_foxkit_linux_musleabihf.rs
create mode 100644 compiler/rustc_target/src/spec/i586_foxkit_linux_musl.rs
create mode 100644 compiler/rustc_target/src/spec/powerpc64_foxkit_linux_musl.rs
create mode 100644 compiler/rustc_target/src/spec/powerpc_foxkit_linux_musl.rs
create mode 100644 compiler/rustc_target/src/spec/x86_64_foxkit_linux_musl.rs
diff --git a/compiler/rustc_target/src/spec/aarch64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_foxkit_linux_musl.rs
new file mode 100644
index 00000000000..4bdd51af4fe
--- /dev/null
+++ b/compiler/rustc_target/src/spec/aarch64_foxkit_linux_musl.rs
@@ -0,0 +1,11 @@
+use crate::spec::Target;
+
+pub fn target() -> Target {
+ let mut base = super::aarch64_unknown_linux_musl::target();
+
+ base.llvm_target = "aarch64-foxkit-linux-musl".to_string();
+ base.vendor = "foxkit".to_string();
+ base.options.crt_static_default = false;
+
+ base
+}
diff --git a/compiler/rustc_target/src/spec/armv7_foxkit_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_foxkit_linux_musleabihf.rs
new file mode 100644
index 00000000000..994f3c39e7c
--- /dev/null
+++ b/compiler/rustc_target/src/spec/armv7_foxkit_linux_musleabihf.rs
@@ -0,0 +1,11 @@
+use crate::spec::Target;
+
+pub fn target() -> Target {
+ let mut base = super::armv7_unknown_linux_musleabihf::target();
+
+ base.llvm_target = "armv7-foxkit-linux-musleabihf".to_string();
+ base.vendor = "foxkit".to_string();
+ base.options.crt_static_default = false;
+
+ base
+}
diff --git a/compiler/rustc_target/src/spec/i586_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/i586_foxkit_linux_musl.rs
new file mode 100644
index 00000000000..028e4b5e930
--- /dev/null
+++ b/compiler/rustc_target/src/spec/i586_foxkit_linux_musl.rs
@@ -0,0 +1,11 @@
+use crate::spec::Target;
+
+pub fn target() -> Target {
+ let mut base = super::i586_unknown_linux_musl::target();
+
+ base.llvm_target = "i586-foxkit-linux-musl".to_string();
+ base.vendor = "foxkit".to_string();
+ base.options.crt_static_default = false;
+
+ base
+}
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index 92678aed5b1..66a408d0b36 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -804,6 +804,13 @@ fn $module() {
}
supported_targets! {
+ ("aarch64-foxkit-linux-musl", aarch64_foxkit_linux_musl),
+ ("armv7-foxkit-linux-musleabihf", armv7_foxkit_linux_musleabihf),
+ ("i586-foxkit-linux-musl", i586_foxkit_linux_musl),
+ ("powerpc-foxkit-linux-musl", powerpc_foxkit_linux_musl),
+ ("powerpc64-foxkit-linux-musl", powerpc64_foxkit_linux_musl),
+ ("x86_64-foxkit-linux-musl", x86_64_foxkit_linux_musl),
+
("x86_64-unknown-linux-gnu", x86_64_unknown_linux_gnu),
("x86_64-unknown-linux-gnux32", x86_64_unknown_linux_gnux32),
("i686-unknown-linux-gnu", i686_unknown_linux_gnu),
diff --git a/compiler/rustc_target/src/spec/powerpc64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_foxkit_linux_musl.rs
new file mode 100644
index 00000000000..04a50f84b60
--- /dev/null
+++ b/compiler/rustc_target/src/spec/powerpc64_foxkit_linux_musl.rs
@@ -0,0 +1,11 @@
+use crate::spec::Target;
+
+pub fn target() -> Target {
+ let mut base = super::powerpc64_unknown_linux_musl::target();
+
+ base.llvm_target = "powerpc64-foxkit-linux-musl".to_string();
+ base.vendor = "foxkit".to_string();
+ base.options.crt_static_default = false;
+
+ base
+}
diff --git a/compiler/rustc_target/src/spec/powerpc_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_foxkit_linux_musl.rs
new file mode 100644
index 00000000000..7bca52c4299
--- /dev/null
+++ b/compiler/rustc_target/src/spec/powerpc_foxkit_linux_musl.rs
@@ -0,0 +1,11 @@
+use crate::spec::Target;
+
+pub fn target() -> Target {
+ let mut base = super::powerpc_unknown_linux_musl::target();
+
+ base.llvm_target = "powerpc-foxkit-linux-musl".to_string();
+ base.vendor = "foxkit".to_string();
+ base.options.crt_static_default = false;
+
+ base
+}
diff --git a/compiler/rustc_target/src/spec/x86_64_foxkit_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_foxkit_linux_musl.rs
new file mode 100644
index 00000000000..1ff73687c00
--- /dev/null
+++ b/compiler/rustc_target/src/spec/x86_64_foxkit_linux_musl.rs
@@ -0,0 +1,11 @@
+use crate::spec::Target;
+
+pub fn target() -> Target {
+ let mut base = super::x86_64_unknown_linux_musl::target();
+
+ base.llvm_target = "x86_64-foxkit-linux-musl".to_string();
+ base.vendor = "foxkit".to_string();
+ base.options.crt_static_default = false;
+
+ base
+}
--
2.35.1