Skip to content

Commit 57936b0

Browse files
committed
moar build fixes
1 parent 5d0650b commit 57936b0

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

.gitlab/compile_extension.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,5 @@ wait
2727
# Link extension
2828
sed -i 's/-export-symbols .*\/ddtrace\.sym/-Wl,--retain-symbols-file=ddtrace.sym/g' ${EXTENSION_DIR}/ddtrace.ldflags
2929
cc -shared -Wl,-whole-archive ${MODULES_DIR}/ddtrace.a -Wl,-no-whole-archive $(cat ${EXTENSION_DIR}/ddtrace.ldflags) ${CARGO_TARGET_DIR}/debug/libddtrace_php.a -Wl,-soname -Wl,ddtrace.so -o ${MODULES_DIR}/ddtrace.so
30+
# should alredy be the case, but just in case ensure it's made executable
31+
chmod +x ${MODULES_DIR}/ddtrace.so

datadog-setup.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -956,6 +956,11 @@ function safe_copy_extension($source, $destination)
956956

957957
$tmpName = $destination . '.tmp';
958958
copy($source, $tmpName);
959+
// Preserve execute permission from source: required for ExecSolib (the kernel
960+
// execve's ddtrace.so directly to spawn the sidecar).
961+
if (!IS_WINDOWS && is_executable($source)) {
962+
chmod($tmpName, fileperms($tmpName) | 0111);
963+
}
959964
rename($tmpName, $destination);
960965
echo "Copied '$source' to '$destination'\n";
961966
}

0 commit comments

Comments
 (0)