Skip to content

Commit 61f8f68

Browse files
committed
Make fuzzing sapi i386 compatible
* Avoid an unnecessary -lstdc++ dependency. It's not going to be used in the end anyway, and is an unnecessary hassle to set up. * Use $LIB_FUZZING_ENGINE instead of hardcoding -lFuzzingEngine.
1 parent 8145da0 commit 61f8f68

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sapi/fuzzer/config.m4

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,9 @@ AC_DEFUN([PHP_FUZZER_TARGET], [
2020

2121
if test "$PHP_FUZZER" != "no"; then
2222
AC_MSG_RESULT([yes])
23-
PHP_REQUIRE_CXX()
23+
dnl Don't use PHP_REQUIRE_CXX() to avoid unnecessarily pulling in -lstdc++
24+
AC_PROG_CXX
25+
AC_PROG_CXXCPP
2426
PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/sapi/fuzzer/Makefile.frag)
2527
SAPI_FUZZER_PATH=sapi/fuzzer
2628
PHP_SUBST(SAPI_FUZZER_PATH)
@@ -41,7 +43,7 @@ if test "$PHP_FUZZER" != "no"; then
4143
AC_MSG_ERROR(Compiler doesn't support -fsanitize=fuzzer-no-link)
4244
])
4345
else
44-
FUZZING_LIB="-lFuzzingEngine"
46+
FUZZING_LIB="$LIB_FUZZING_ENGINE"
4547
FUZZING_CC="$CXX -stdlib=libc++"
4648
fi
4749
PHP_SUBST(FUZZING_LIB)

0 commit comments

Comments
 (0)