aboutsummaryrefslogtreecommitdiffstats
path: root/devel/libdatadog/files/patch-builder-src-arch-freebsd.rs
diff options
context:
space:
mode:
authorLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
committerLexi Winter <ivy@FreeBSD.org>2025-12-01 03:19:41 +0000
commit2e80774d0b20d167bc0a9e2b63dafbfb171c0d22 (patch)
tree25f0138e1af8902b92dacc8cce09b267447c17db /devel/libdatadog/files/patch-builder-src-arch-freebsd.rs
parentf85f2b2d6e5b7ed869376eb4b180c3a74a5c5da9 (diff)
parent1a30da80670973368b399f2b01fe9c04b91a1273 (diff)
Merge remote-tracking branch 'freebsd/main' into lf/mainlf/main
Diffstat (limited to 'devel/libdatadog/files/patch-builder-src-arch-freebsd.rs')
-rw-r--r--devel/libdatadog/files/patch-builder-src-arch-freebsd.rs25
1 files changed, 22 insertions, 3 deletions
diff --git a/devel/libdatadog/files/patch-builder-src-arch-freebsd.rs b/devel/libdatadog/files/patch-builder-src-arch-freebsd.rs
index 73b33b23dc7f..8f37cf76ea63 100644
--- a/devel/libdatadog/files/patch-builder-src-arch-freebsd.rs
+++ b/devel/libdatadog/files/patch-builder-src-arch-freebsd.rs
@@ -1,11 +1,19 @@
---- builder/src/arch/freebsd.rs.orig 2025-03-17 18:38:16 UTC
+--- builder/src/arch/freebsd.rs.orig 2025-11-26 08:32:19 UTC
+++ builder/src/arch/freebsd.rs
-@@ -0,0 +1,18 @@
+@@ -0,0 +1,37 @@
++use std::ffi::OsStr;
++
+use std::process::Command;
+
+pub const NATIVE_LIBS: &str = " -lc -ldl -lm -lpthread -lrt -lutil";
++pub const PROF_DYNAMIC_LIB: &str = "libdatadog_profiling.so";
++pub const PROF_STATIC_LIB: &str = "libdatadog_profiling.a";
++pub const PROF_DYNAMIC_LIB_FFI: &str = "libdatadog_profiling_ffi.so";
++pub const PROF_STATIC_LIB_FFI: &str = "libdatadog_profiling_ffi.a";
+pub const REMOVE_RPATH: bool = false;
-+pub const RUSTFLAGS: [&str; 2] = ["-C", "relocation-model=pic"];
++pub const BUILD_CRASHTRACKER: bool = true;
++// pub const RUSTFLAGS: [&str; 4] = ["-C", "relocation-model=pic"];
++pub const RUSTFLAGS: [&str; 4] = ["-C", "relocation-model=pic", "-C", "link-arg=-Wl,-soname,libdatadog_profiling.so"];
+
+pub fn fix_rpath(lib_path: &str) {
+ if REMOVE_RPATH {
@@ -19,3 +27,14 @@
+ }
+}
+
++pub fn strip_libraries(lib_path: &str) {
++ let mut strip = Command::new("strip")
++ .arg("-S")
++ .arg(lib_path.to_owned() + "/libdatadog_profiling.so")
++ .spawn()
++ .expect("Failed to spawn strip");
++
++ strip.wait().expect("Failed to strip library");
++}
++
++pub fn add_additional_files(_lib_path: &str, _target_path: &OsStr) {}