Skip to content

Commit b90c9ca

Browse files
Freakydevnexen
authored andcommitted
Enable ifunc checks on FreeBSD 12+
This was disabled in 2019 due to problems reported in FreeBSD 11. The original report (PHP bug 77284) includes a comment that FreeBSD 12 worked - which also happens to be the first version ifunc use appeared in libc. Close GH-12288
1 parent 07a4f89 commit b90c9ca

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

NEWS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PHP NEWS
55
Core:
66
. Added zend_call_stack_get implementation for NetBSD, DragonFlyBSD,
77
Solaris and Haiku. (David Carlier)
8+
. Enabled ifunc checks on FreeBSD from the 12.x releases. (Freaky)
89

910
Date:
1011
. Added DateTime[Immutable]::createFromTimestamp. (Marc Bennewitz)

configure.ac

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -562,10 +562,12 @@ dnl Checks for GCC function attributes on all systems except ones without glibc
562562
dnl Fix for these systems is already included in GCC 7, but not on GCC 6.
563563
dnl
564564
dnl At least some versions of FreeBSD seem to have buggy ifunc support, see
565-
dnl bug #77284. Conservatively don't use ifuncs on FreeBSD.
566-
AS_CASE([$host_alias], [*-*-*android*|*-*-*uclibc*|*-*-*musl*|*freebsd*|*openbsd*], [true], [
567-
AX_GCC_FUNC_ATTRIBUTE([ifunc])
568-
AX_GCC_FUNC_ATTRIBUTE([target])
565+
dnl bug #77284. Conservatively don't use ifuncs on FreeBSD prior to version 12.
566+
AS_CASE([$host_alias], [*-*-*android*|*-*-*uclibc*|*-*-*musl*|*openbsd*], [true], [
567+
if test "`uname -s 2>/dev/null`" != "FreeBSD" || test "`uname -U 2>/dev/null`" -ge 1200000; then
568+
AX_GCC_FUNC_ATTRIBUTE([ifunc])
569+
AX_GCC_FUNC_ATTRIBUTE([target])
570+
fi
569571
])
570572

571573
dnl Check for IPv6 support.

0 commit comments

Comments
 (0)