1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 00:02:20 +01:00

Fix build with -std=

When building in strict mode (e.g. -std=c11), compilation of
main/debug_gdb_scripts.c fails because asm() is not a standard top level
statement. __asm__() however can be reserved by the compiler even in strict
mode.

Partially fixes GH-21215. IR needs a similar fix (dstogov/ir#128).
Closes GH-21226.
This commit is contained in:
Arnaud Le Blanc
2026-02-16 12:58:01 +01:00
parent b6495c189a
commit ede7c67389
3 changed files with 3 additions and 2 deletions

1
NEWS
View File

@@ -10,6 +10,7 @@ PHP NEWS
accessing properties on Reflection LazyProxy via isset()). (Arnaud)
. Fixed OSS-Fuzz #478009707 (Borked assign-op/inc/dec on untyped hooked
property backing value). (ilutov)
. Fixed bug GH-21215 (Build fails with -std=). (Arnaud)
- Curl:
. Fixed bug GH-21023 (CURLOPT_XFERINFOFUNCTION crash with a null callback).

View File

@@ -6,7 +6,7 @@
*
* See https://sourceware.org/gdb/current/onlinedocs/gdb.html/dotdebug_005fgdb_005fscripts-section.html#dotdebug_005fgdb_005fscripts-section
*/
asm(
__asm__(
".pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n"
".byte 4 /* Python Text */\n"
".ascii \"gdb.inlined-script\\n\"\n"

View File

@@ -27,7 +27,7 @@ $ccode = sprintf(
*
* See https://sourceware.org/gdb/current/onlinedocs/gdb.html/dotdebug_005fgdb_005fscripts-section.html#dotdebug_005fgdb_005fscripts-section
*/
asm(
__asm__(
".pushsection \".debug_gdb_scripts\", \"MS\",%%progbits,1\n"
".byte 4 /* Python Text */\n"
".ascii \"gdb.inlined-script\\n\"\n"