php-src/build
Filip Zrůst 475fd29527 Improve DTrace probe generation /w non-default compiler
With DTrace support enabled during ./configure, our custom Autoconf
macro PHP_INIT_DTRACE creates make rules to generate header and object
files using dtrace utility. SystemTap† implementation of dtrace relies
on other utilities to provide header preprocessing and final object file
compilation. These utilities are configured by common environment
variables with common defaults:‡

* preprocessor from CPP defaults to “cpp”
* compiler from CC defaults to “gcc”
* compiler arguments can be expanded with CFLAGS

This has been in SystemTap since version 1.5 released on 2011-05-23. We
have been setting CFLAGS for dtrace since 717b367 released in versions
5.4.20 and 5.5.4 on 2013-09-18. This change fixed build against
SystemTap. It fixes majority of cases since practically all free Linux
distributions use SystemTap for DTrace-like dynamic tracing and
practically all of them use GCC or compatible compiler suite. However,
this becomes an issue when cross-compiling using GCC because utility
names contain target triplets. Autoconf already handles
cross-compilation well —setting correct CC and CPP make macros
(variables).

Therefore, we simply set CC and CPP environment variables using
respective macros when executing dtrace. Although SystemTap dtrace does
not always use CC nor CPP, we set it every time. SystemTap documentation
does not talk about this at all¶, so it is safer to always set it. We
also follow how we set CFLAGS every time in the past.

Original (or ported) DTrace mainly used on Oracle Linux, Solaris and
macOS ignores these and does not support cross compilation.§

† Well-known dynamic tracing infrastructure for Linux compatible with
statically-defined tracing from DTrace.
‡ https://sourceware.org/git/?p=systemtap.git;a=blob;f=dtrace.in;h=73a6f22e2de072773c692e3fea05c4b8cf814e43;hb=ebb424eee5599fcc131901c0d82d0bfc0d2f57abhttps://sourceware.org/systemtap/man/dtrace.1.html
§ https://docs.oracle.com/cd/E88353_01/html/E72487/dtrace-8.html

Closes GH-11643
2023-07-19 15:30:50 +02:00
..
ax_check_compile_flag.m4 Upgrade AX_CHECK_COMPILE_FLAG macro to serial 6 2018-07-28 01:40:02 +02:00
ax_func_which_gethostbyname_r.m4 Move Autoconf Archive macros to a common m4 dir 2019-04-23 20:37:31 +02:00
ax_gcc_func_attribute.m4 Revert "Fix detection of unknown gcc function attributes" 2022-06-03 08:04:07 +01:00
config-stubs Remove unused Git attributes ident 2018-07-25 00:53:25 +02:00
config.guess Update config.guess to 2023-06-23 and config.sub to 2023-06-26 (#11711) 2023-07-16 18:43:20 +01:00
config.sub Update config.guess to 2023-06-23 and config.sub to 2023-06-26 (#11711) 2023-07-16 18:43:20 +01:00
gen_stub.php Revert "Merge branch 'PHP-8.2'" 2023-07-04 09:18:49 +02:00
genif.sh Refactor genif.sh 2019-07-08 14:58:26 +02:00
libtool.m4 Fix #9483: Fix autoconf warnings due to old libtool (#11207) 2023-05-15 16:54:40 +01:00
ltmain.sh Fix libtool to provide a simple way to generate only "shared" object files or libraries. 2020-04-27 23:31:54 +03:00
Makefile.gcov Unbundle ext/xmlrpc 2020-05-29 16:47:44 +02:00
Makefile.global make clean: remove ext/opcache/minilua 2023-02-21 21:24:16 +00:00
order_by_dep.awk Fix PHP_ADD_EXTENSION_DEP without indentation 2021-06-10 11:48:25 +02:00
php.m4 Improve DTrace probe generation /w non-default compiler 2023-07-19 15:30:50 +02:00
php_cxx_compile_stdcxx.m4 build: Extend m4 to support C++20 2022-03-20 00:30:15 +01:00
pkg.m4 Fix FSF address & update year to 2022 2022-03-19 18:25:29 +01:00
print_include.awk
shtool Fix FSF address & update year to 2022 2022-03-19 18:25:29 +01:00