Date: Wed, 22 Nov 2023 16:38:40 GMT From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org Subject: git: 3966e6733b0b - main - lang/rust: Garbage collect powerpc patches Message-ID: <202311221638.3AMGcehB051942@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=3966e6733b0b54a503a6c14574dfbeffb7bdeabd commit 3966e6733b0b54a503a6c14574dfbeffb7bdeabd Author: Mikael Urankar <mikael@FreeBSD.org> AuthorDate: 2023-11-22 16:37:00 +0000 Commit: Piotr Kubaj <pkubaj@FreeBSD.org> CommitDate: 2023-11-22 16:38:26 +0000 lang/rust: Garbage collect powerpc patches PR: 273753 --- ...project_llvm_lib_Driver_ToolChains_Arch_PPC.cpp | 12 ---------- ...roject_llvm_lib_Target_PowerPC_PPCSubtarget.cpp | 13 ----------- ...c__target_src_spec_powerpc__unknown__freebsd.rs | 27 ---------------------- 3 files changed, 52 deletions(-) diff --git a/lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Driver_ToolChains_Arch_PPC.cpp b/lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Driver_ToolChains_Arch_PPC.cpp deleted file mode 100644 index 1792812b212d..000000000000 --- a/lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Driver_ToolChains_Arch_PPC.cpp +++ /dev/null @@ -1,12 +0,0 @@ ---- src/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp.orig 2021-04-27 07:29:31.811399000 -0500 -+++ src/llvm-project/clang/lib/Driver/ToolChains/Arch/PPC.cpp 2021-04-27 07:40:14.185257000 -0500 -@@ -126,7 +126,8 @@ ppc::ReadGOTPtrMode ppc::getPPCReadGOTPtrMode(const Dr - const ArgList &Args) { - if (Args.getLastArg(options::OPT_msecure_plt)) - return ppc::ReadGOTPtrMode::SecurePlt; -- if ((Triple.isOSFreeBSD() && Triple.getOSMajorVersion() >= 13) || -+ if ((Triple.isOSFreeBSD() && -+ (Triple.getOSMajorVersion() == 0 || Triple.getOSMajorVersion() >= 13)) || - Triple.isOSNetBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) - return ppc::ReadGOTPtrMode::SecurePlt; - else diff --git a/lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Target_PowerPC_PPCSubtarget.cpp b/lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Target_PowerPC_PPCSubtarget.cpp deleted file mode 100644 index 363094b72fae..000000000000 --- a/lang/rust/files/powerpc/patch-src_llvm__project_llvm_lib_Target_PowerPC_PPCSubtarget.cpp +++ /dev/null @@ -1,13 +0,0 @@ ---- src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp.orig 2021-04-27 07:17:18.744914000 -0500 -+++ src/llvm-project/llvm/lib/Target/PowerPC/PPCSubtarget.cpp 2021-04-27 07:25:23.450714000 -0500 -@@ -151,7 +151,9 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU - if (IsPPC64 && has64BitSupport()) - Use64BitRegs = true; - -- if ((TargetTriple.isOSFreeBSD() && TargetTriple.getOSMajorVersion() >= 13) || -+ if ((TargetTriple.isOSFreeBSD() && -+ (TargetTriple.getOSMajorVersion() == 0 || -+ TargetTriple.getOSMajorVersion() >= 13)) || - TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() || - TargetTriple.isMusl()) - SecurePlt = true; diff --git a/lang/rust/files/powerpc/patch-vendor_rustc__ap__rustc__target_src_spec_powerpc__unknown__freebsd.rs b/lang/rust/files/powerpc/patch-vendor_rustc__ap__rustc__target_src_spec_powerpc__unknown__freebsd.rs deleted file mode 100644 index cdaaef7f84f6..000000000000 --- a/lang/rust/files/powerpc/patch-vendor_rustc__ap__rustc__target_src_spec_powerpc__unknown__freebsd.rs +++ /dev/null @@ -1,27 +0,0 @@ ---- /dev/null 2021-04-24 17:00:30.889028000 -0500 -+++ vendor/rustc-ap-rustc_target/src/spec/powerpc_unknown_freebsd.rs 2021-04-24 17:00:25.903298000 -0500 -@@ -0,0 +1,24 @@ -+use crate::abi::Endian; -+use crate::spec::{LinkerFlavor, RelocModel, Target, TargetOptions}; -+ -+pub fn target() -> Target { -+ let mut base = super::freebsd_base::opts(); -+ base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("-m32".to_string()); -+ // Extra hint to linker that we are generating secure-PLT code. -+ base.pre_link_args.entry(LinkerFlavor::Gcc).or_default().push("--target=powerpc-unknown-freebsd13.0".to_string()); -+ base.max_atomic_width = Some(32); -+ -+ Target { -+ llvm_target: "powerpc-unknown-freebsd13.0".to_string(), -+ pointer_width: 32, -+ data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), -+ arch: "powerpc".to_string(), -+ options: TargetOptions { -+ endian: Endian::Big, -+ features: "+secure-plt".to_string(), -+ relocation_model: RelocModel::Pic, -+ mcount: "_mcount".to_string(), -+ ..base -+ }, -+ } -+}
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202311221638.3AMGcehB051942>