aboutsummaryrefslogtreecommitdiff
path: root/devel/libdatadog/files/patch-builder-src-arch-freebsd.rs
diff options
context:
space:
mode:
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) {}