]> granicus.if.org Git - php/commitdiff
Only check linking in PHP_TEST_BUILD
authorNikita Popov <nikita.ppv@gmail.com>
Sun, 20 Sep 2020 08:24:54 +0000 (10:24 +0200)
committerNikita Popov <nikita.ppv@gmail.com>
Sun, 20 Sep 2020 08:24:54 +0000 (10:24 +0200)
Given that this executes a random function with zero parameters,
actually executing the code doesn't make sense.

This should fix the imap + asan build.

build/php.m4

index b0e3c424d18e41faa64fb1201cdeaaea0a847f0d..1f77f38e572f2357246b8b663212581bd9a18481 100644 (file)
@@ -1626,7 +1626,7 @@ dnl
 AC_DEFUN([PHP_TEST_BUILD], [
   old_LIBS=$LIBS
   LIBS="$4 $LIBS"
-  AC_RUN_IFELSE([AC_LANG_SOURCE([[
+  AC_LINK_IFELSE([AC_LANG_SOURCE([[
     $5
     char $1();
     int main() {
@@ -1639,8 +1639,6 @@ AC_DEFUN([PHP_TEST_BUILD], [
   ],[
     LIBS=$old_LIBS
     $3
-  ],[
-    LIBS=$old_LIBS
   ])
 ])