* add missing files

This commit is contained in:
Alexander Baldeck 2021-06-16 22:23:02 +02:00
parent 8999b0a455
commit 49d9d87cae
14 changed files with 538 additions and 0 deletions

View File

@ -0,0 +1,7 @@
# arg 1: the new package version
# arg 2: the old package version
post_upgrade() {
if (( $(vercmp "$2" '1.2.5-1') < 0 )); then
printf "WARNING: Non-backwards compatible changes to ALSA require restarting of audio engines (e.g. pulseaudio or pipewire) using it.\n"
fi
}

View File

@ -0,0 +1,26 @@
From 4443eca0d6b3ba599832b2f73a5350fdd0c90d10 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/15] Fix LLVM build
---
src/bootstrap/lib.rs | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index a476d25f..c7e63990 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -768,7 +768,8 @@ impl Build {
.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.26.2

View File

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Thu, 6 May 2021 20:14:58 +0200
Subject: [PATCH] bootstrap: Change libexec dir
---
src/bootstrap/dist.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index 78b1d905459..ede4d221ea2 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -988,7 +988,7 @@ fn run(self, builder: &Builder<'_>) -> GeneratedTarball {
for dirent in fs::read_dir(cargo.parent().unwrap()).expect("read_dir") {
let dirent = dirent.expect("read dir entry");
if dirent.file_name().to_str().expect("utf8").starts_with("cargo-credential-") {
- tarball.add_file(&dirent.path(), "libexec", 0o755);
+ tarball.add_file(&dirent.path(), "lib", 0o755);
}
}

View File

@ -0,0 +1,22 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Thu, 6 May 2021 20:13:31 +0200
Subject: [PATCH] cargo: Change libexec dir
---
src/cargo/ops/registry/auth.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cargo/ops/registry/auth.rs b/src/cargo/ops/registry/auth.rs
index 660daa40d..2edc581c7 100644
--- a/src/cargo/ops/registry/auth.rs
+++ b/src/cargo/ops/registry/auth.rs
@@ -223,7 +223,7 @@ fn sysroot_credential(
.parent()
.and_then(|p| p.parent())
.ok_or_else(|| format_err!("expected cargo path {}", cargo.display()))?;
- let exe = root.join("libexec").join(format!(
+ let exe = root.join("lib").join(format!(
"cargo-credential-{}{}",
cred_name,
std::env::consts::EXE_SUFFIX

View File

@ -0,0 +1,84 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com>
Date: Fri, 12 Mar 2021 17:31:56 +0100
Subject: [PATCH] compiler: Change LLVM targets
- Change x86_64-unknown-linux-gnu to use x86_64-pc-linux-gnu
- Change i686-unknown-linux-gnu to use i686-pc-linux-gnu
Reintroduce the aliasing that was removed in 1.52.0 and alias the -pc-
triples to the -unknown- triples. This avoids defining proper -pc-
targets, as things break when this is done:
- The crate ecosystem expects the -unknown- targets. Making -pc-
rustc's host triple (and thus default target) would break various
crates.
- Firefox's build breaks when the host triple (from
`rustc --version --verbose`) is different from the target triple
(from `rustc --print target-list`) that best matches autoconf.
---
compiler/rustc_session/src/config.rs | 2 +-
compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs | 2 +-
compiler/rustc_target/src/spec/mod.rs | 9 +++++++++
.../rustc_target/src/spec/x86_64_unknown_linux_gnu.rs | 2 +-
4 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs
index 85448b7fe72..fb7f79433e2 100644
--- a/compiler/rustc_session/src/config.rs
+++ b/compiler/rustc_session/src/config.rs
@@ -1536,7 +1536,7 @@ fn parse_target_triple(matches: &getopts::Matches, error_format: ErrorOutputType
early_error(error_format, &format!("target file {:?} does not exist", path))
})
}
- Some(target) => TargetTriple::TargetTriple(target),
+ Some(target) => TargetTriple::from_alias(target),
_ => TargetTriple::from_triple(host_triple()),
}
}
diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs
index 9daf1d37dd2..b38e1888047 100644
--- a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs
+++ b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs
@@ -9,7 +9,7 @@ pub fn target() -> Target {
base.stack_probes = StackProbeType::Call;
Target {
- llvm_target: "i686-unknown-linux-gnu".to_string(),
+ llvm_target: "i686-pc-linux-gnu".to_string(),
pointer_width: 32,
data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\
f64:32:64-f80:32-n8:16:32-S128"
diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs
index c9fffd213d7..7bed09dd880 100644
--- a/compiler/rustc_target/src/spec/mod.rs
+++ b/compiler/rustc_target/src/spec/mod.rs
@@ -1994,6 +1994,15 @@ pub fn from_path(path: &Path) -> Result<Self, io::Error> {
Ok(TargetTriple::TargetPath(canonicalized_path))
}
+ /// Creates a target triple from its alias
+ pub fn from_alias(triple: String) -> Self {
+ match triple.as_str() {
+ "x86_64-pc-linux-gnu" => TargetTriple::from_triple("x86_64-unknown-linux-gnu"),
+ "i686-pc-linux-gnu" => TargetTriple::from_triple("i686-unknown-linux-gnu"),
+ _ => TargetTriple::TargetTriple(triple),
+ }
+ }
+
/// Returns a string triple for this target.
///
/// If this target is a path, the file name (without extension) is returned.
diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
index 04499bc5bbe..63f983bff0b 100644
--- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
+++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs
@@ -9,7 +9,7 @@ pub fn target() -> Target {
base.stack_probes = StackProbeType::Call;
Target {
- llvm_target: "x86_64-unknown-linux-gnu".to_string(),
+ llvm_target: "x86_64-pc-linux-gnu".to_string(),
pointer_width: 64,
data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
.to_string(),

View File

@ -0,0 +1,30 @@
From e44838dabefa1a62578895b4465717f7be8a7a86 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 6 Oct 2018 04:01:48 +0000
Subject: [PATCH 06/15] 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 838b1a27..94fa9f6d 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.26.2

View File

@ -0,0 +1,24 @@
From cde014a1108b7d1cea85100cad48b12297267405 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Mon, 17 Sep 2018 01:32:20 +0000
Subject: [PATCH 07/15] 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 a35174b3..9e770706 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.26.2

View File

@ -0,0 +1,91 @@
From c63745a2777648d530898bae5af9d25266472b05 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sat, 21 Dec 2019 17:00:40 +0100
Subject: [PATCH 08/15] 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)
simd-intrinsic-generic-bitmask.rs: broken on BE, #59356
simd-intrinsic-generic-select.rs: broken on BE, #59356
sparc-struct-abi: no sparc target
sysroot-crates-are-unstable: can't run rustc without RPATH
---
src/test/codegen/sparc-struct-abi.rs | 1 +
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 +
src/test/ui/simd/simd-intrinsic-generic-bitmask.rs | 2 ++
6 files changed, 10 insertions(+)
diff --git a/src/test/codegen/sparc-struct-abi.rs b/src/test/codegen/sparc-struct-abi.rs
index 78e5b14a..6f93e932 100644
--- a/src/test/codegen/sparc-struct-abi.rs
+++ b/src/test/codegen/sparc-struct-abi.rs
@@ -4,6 +4,7 @@
// only-sparc64
// compile-flags: -O --target=sparc64-unknown-linux-gnu --crate-type=rlib
+// ignore-test
#![feature(no_core, lang_items)]
#![no_core]
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 f124ca2a..363b18f0 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 5876fbc9..5f167ece 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 9e770706..6d92ec5c 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 c5c824ac..f3fe047a 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-cloudabi no execve
diff --git a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
index b28f742a..3ee4ccce 100644
--- a/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
+++ b/src/test/ui/simd/simd-intrinsic-generic-bitmask.rs
@@ -2,6 +2,8 @@
#![allow(non_camel_case_types)]
// ignore-emscripten
+// ignore-powerpc
+// ignore-powerpc64
// Test that the simd_bitmask intrinsic produces correct results.
--
2.26.2

View File

@ -0,0 +1,31 @@
From f5dad49f112151bb0ee74570e971bd475cbec128 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 3 May 2020 18:00:09 +0200
Subject: [PATCH 09/15] Link stage2 tools dynamically to libstd
Replaces an older patch by Samuel Holland. The RUSTC_NO_PREFER_DYNAMIC
env var was removed and replaced with the following logic in builder.rs.
The idea for this patch is to link stage2 tools dynamically as these will
be distributed (if built). Intermediate tools from previous stages will
be statically linked for convenience.
---
src/bootstrap/builder.rs | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs
index eb0199fd..0ec7cbd8 100644
--- a/src/bootstrap/builder.rs
+++ b/src/bootstrap/builder.rs
@@ -1236,6 +1236,8 @@ impl<'a> Builder<'a> {
// linking all deps statically into the dylib.
if let Mode::Std | Mode::Rustc | Mode::Codegen = mode {
rustflags.arg("-Cprefer-dynamic");
+ } else if stage >= 2 {
+ rustflags.arg("-Cprefer-dynamic");
}
// When building incrementally we default to a lower ThinLTO import limit
--
2.26.2

View File

@ -0,0 +1,58 @@
From c6b54a373e74a1e4ce64f349b5b69105f2bc1a49 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 3 May 2020 18:08:09 +0200
Subject: [PATCH 15/15] Use ELFv2 ABI on all powerpc64 targets
This patches librustc_target so that ELFv2 is used everywhere, matching our
LLVM. While this is not perfect (it does not allow rustc to compile legacy
binaries), rustc never requests specific ABI from llvm in the first place,
so at least match the environment we have.
---
src/librustc_target/abi/call/powerpc64.rs | 9 +--------
src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs | 6 +-----
2 files changed, 2 insertions(+), 13 deletions(-)
diff --git a/src/librustc_target/abi/call/powerpc64.rs b/src/librustc_target/abi/call/powerpc64.rs
index 93c4e97d..96b02486 100644
--- a/src/librustc_target/abi/call/powerpc64.rs
+++ b/src/librustc_target/abi/call/powerpc64.rs
@@ -119,14 +119,7 @@ where
Ty: TyLayoutMethods<'a, C> + Copy,
C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec,
{
- let abi = if cx.target_spec().target_env == "musl" {
- ELFv2
- } else {
- match cx.data_layout().endian {
- Endian::Big => ELFv1,
- Endian::Little => ELFv2,
- }
- };
+ let abi = ELFv2;
if !fn_abi.ret.is_ignore() {
classify_ret(cx, &mut fn_abi.ret, abi);
diff --git a/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs b/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
index 5306d905..c63eed85 100644
--- a/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
+++ b/src/librustc_target/spec/powerpc64_unknown_linux_gnu.rs
@@ -1,4 +1,4 @@
-use crate::spec::{LinkerFlavor, RelroLevel, Target, TargetOptions, TargetResult};
+use crate::spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
pub fn target() -> TargetResult {
let mut base = super::linux_base::opts();
@@ -6,10 +6,6 @@ pub fn target() -> TargetResult {
base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string());
base.max_atomic_width = Some(64);
- // ld.so in at least RHEL6 on ppc64 has a bug related to BIND_NOW, so only enable partial RELRO
- // for now. https://github.com/rust-lang/rust/pull/43170#issuecomment-315411474
- base.relro_level = RelroLevel::Partial;
-
Ok(Target {
llvm_target: "powerpc64-unknown-linux-gnu".to_string(),
target_endian: "big".to_string(),
--
2.26.2

View File

@ -0,0 +1,26 @@
From 227096bde5283269aa1d1002860b6ec54d2cf284 Mon Sep 17 00:00:00 2001
From: Johannes Brechtmann <johannes.brechtmann@gmail.com>
Date: Sun, 22 Nov 2020 16:00:50 +0100
Subject: [PATCH] Revert "Include libunwind in the rust-src component."
This reverts commit 9f27f3796d3487411ab035803a0757d69040649c.
---
src/bootstrap/dist.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/bootstrap/dist.rs b/src/bootstrap/dist.rs
index b2a590307a2..020cd665a0e 100644
--- a/src/bootstrap/dist.rs
+++ b/src/bootstrap/dist.rs
@@ -1016,7 +1016,7 @@ impl Step for Src {
copy_src_dirs(
builder,
&builder.src,
- &["library", "src/llvm-project/libunwind"],
+ &["library"],
&[
// not needed and contains symlinks which rustup currently
// chokes on when unpacking.
--
2.29.2

View File

@ -0,0 +1,58 @@
--- rustc-1.48.0-src/src/tools/rls/rls/src/cmd.rs.orig 2021-04-08 11:10:17.600000000 +0000
+++ rustc-1.48.0-src/src/tools/rls/rls/src/cmd.rs 2021-04-08 19:35:15.592000000 +0000
@@ -7,7 +7,7 @@
use crate::server::{self, LsService, Notification, Request, RequestId};
use rls_analysis::{AnalysisHost, Target};
use rls_vfs::Vfs;
-use std::sync::atomic::{AtomicU64, Ordering};
+use std::sync::atomic::{AtomicU32, Ordering};
use lsp_types::{
ClientCapabilities, CodeActionContext, CodeActionParams, CompletionItem,
@@ -316,8 +316,8 @@
}
fn next_id() -> RequestId {
- static ID: AtomicU64 = AtomicU64::new(1);
- RequestId::Num(ID.fetch_add(1, Ordering::SeqCst))
+ static ID: AtomicU32 = AtomicU32::new(1);
+ RequestId::Num(ID.fetch_add(1, Ordering::SeqCst).into())
}
// Custom reader and output for the RLS server.
--- rustc-1.48.0-src/src/tools/rls/rls/src/server/io.rs.orig 2021-04-08 11:02:27.604000000 +0000
+++ rustc-1.48.0-src/src/tools/rls/rls/src/server/io.rs 2021-04-08 19:45:19.404000000 +0000
@@ -5,7 +5,7 @@
use std::fmt;
use std::io::{self, BufRead, Write};
-use std::sync::atomic::{AtomicU64, Ordering};
+use std::sync::atomic::{AtomicU32, Ordering};
use std::sync::Arc;
use jsonrpc_core::{self as jsonrpc, response, version, Id};
@@ -169,13 +169,13 @@
/// An output that sends notifications and responses on `stdout`.
#[derive(Clone)]
pub(super) struct StdioOutput {
- next_id: Arc<AtomicU64>,
+ next_id: Arc<AtomicU32>,
}
impl StdioOutput {
/// Constructs a new `stdout` output.
pub(crate) fn new() -> StdioOutput {
- StdioOutput { next_id: Arc::new(AtomicU64::new(1)) }
+ StdioOutput { next_id: Arc::new(AtomicU32::new(1).into()) }
}
}
@@ -192,7 +192,7 @@
}
fn provide_id(&self) -> RequestId {
- RequestId::Num(self.next_id.fetch_add(1, Ordering::SeqCst))
+ RequestId::Num(self.next_id.fetch_add(1, Ordering::SeqCst).into())
}
}

View File

@ -0,0 +1,23 @@
--- rustc-1.41.0-src/src/libstd/build.rs.orig 2020-02-08 17:05:40.390387794 +0200
+++ rustc-1.41.0-src/src/libstd/build.rs 2020-02-08 17:09:46.844426452 +0200
@@ -11,6 +11,8 @@
println!("cargo:rustc-link-lib=dl");
println!("cargo:rustc-link-lib=rt");
println!("cargo:rustc-link-lib=pthread");
+ } else {
+ println!("cargo:rustc-link-lib=ssp_nonshared");
}
} else if target.contains("freebsd") {
println!("cargo:rustc-link-lib=execinfo");
--- rustc-1.44.0-src/src/libunwind/build.rs
+++ rustc-1.44.0-src/src/libunwind/build.rs
@@ -12,6 +12,9 @@ fn main() {
} else if target.contains("linux") {
if !target.contains("android") {
println!("cargo:rustc-link-lib=gcc_s");
+ if target.contains("musl") {
+ println!("cargo:rustc-link-lib=ssp_nonshared");
+ }
}
} else if target.contains("freebsd") {
println!("cargo:rustc-link-lib=gcc_s");

View File

@ -0,0 +1,36 @@
This is not a complete/correct patch, but it makes firefox build. For now
mostly for tracking, so a real fix can be made, but right now it still
segfaults on start.
Ref: https://hg.mozilla.org/mozilla-central/rev/08339a56f3ae
Ref: https://hg.mozilla.org/mozilla-central/rev/d16fcad6aa60
Ref: https://hg.mozilla.org/mozilla-central/rev/ab87611d012e
Ref: https://hg.mozilla.org/mozilla-central/file/tip/xpcom/reflect/xptcall/md/unix/xptcinvoke_ppc_linux.cpp
--- a/xpcom/reflect/xptcall/xptcall.h
+++ b/xpcom/reflect/xptcall/xptcall.h
@@ -71,6 +71,11 @@ struct nsXPTCVariant {
ExtendedVal ext;
};
+#if defined(__powerpc__) && !defined(__powerpc64__)
+ // this field is still necessary on ppc32, as an address
+ // to it is taken certain places in xptcall
+ void *ptr;
+#endif
nsXPTType type;
uint8_t flags;
@@ -91,7 +96,12 @@ struct nsXPTCVariant {
};
void ClearFlags() { flags = 0; }
+#if defined(__powerpc__) && !defined(__powerpc64__)
+ void SetIndirect() { ptr = &val; flags |= IS_INDIRECT; }
+ bool IsPtrData() const { return IsIndirect(); }
+#else
void SetIndirect() { flags |= IS_INDIRECT; }
+#endif
bool IsIndirect() const { return 0 != (flags & IS_INDIRECT); }