Bug 204978 - lang/php56: zend_strtod.c needs __VFP_FP__ defined to work correctly on arm AT91SAM9
Summary: lang/php56: zend_strtod.c needs __VFP_FP__ defined to work correctly on arm ...
Status: Closed Overcome By Events
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Some People
Assignee: Alex Dupre
URL:
Keywords: needs-patch, needs-qa
Depends on:
Blocks:
 
Reported: 2015-12-02 22:17 UTC by David Horwitt
Modified: 2019-01-01 13:43 UTC (History)
6 users (show)

See Also:
koobs: maintainer-feedback? (ale)
koobs: merge-quarterly?


Attachments
Full output of "cc -E -dM - </dev/null" (4.66 KB, text/plain)
2015-12-04 15:18 UTC, David Horwitt
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description David Horwitt 2015-12-02 22:17:02 UTC
<?php
session_start();
?>

This fails with "PHP Fatal error:  Balloc() allocation exceeds list boundary in - on line 2"

This seems to trace from zend_dtoa() in Zend/zend_strtod.c.
#define __VFP_FP__ before line 156 seems to resolve the error.
Comment 2 David Horwitt 2015-12-03 05:32:45 UTC
After applying patch the failing behavior is the same; explicitly defining
__VFP_FP__ restores correct behavior.

It looks like the patch asumes that __VFP_FP__ is supplied by clang (builtin) which isn't the case on my system.
Comment 3 Michael Moll freebsd_committer freebsd_triage 2015-12-03 14:21:58 UTC
is this on armv6 or armv6hf?
Comment 4 David Horwitt 2015-12-03 18:42:23 UTC
AT91SAM9 = ARM926EJS = ARMv5TEJ.

I think; ARM nomenclature hurts my brain.

My buildworld and buildkernel used TARGET=arm and TARGET_ARCH=arm (cross-built on i386).
Comment 5 Mikael Urankar freebsd_committer freebsd_triage 2015-12-04 14:55:02 UTC
What does "cc -E -dM - < /dev/null | grep VFP_FP" returns?
Comment 6 David Horwitt 2015-12-04 15:18:20 UTC
Created attachment 163846 [details]
Full output of "cc -E -dM - </dev/null"
Comment 7 David Horwitt 2015-12-04 15:20:14 UTC
More direct reply to comment 5:

Script started on Fri Dec  4 14:12:46 2015
# uname -v
FreeBSD 10.2-STABLE #1: Tue Nov  3 20:18:10 UTC 2015     root@dstar2:/data/src/sys/arm/compile/SOM9G20M 
# cc -E -dM - </dev/null | grep VFP_FP
# exit
exit

Script done on Fri Dec  4 14:13:10 2015
Comment 8 Michael Moll freebsd_committer freebsd_triage 2015-12-04 16:22:08 UTC
David, could you try if it works when you just define IEEE_LITTLE_ENDIAN?
Comment 9 David Horwitt 2015-12-04 18:00:05 UTC
Does _not_ work when IEEE_LITTLE_ENDIAN is defined.

NB:
 1) Using original zend_strtod.c (patch in comment 1 not applied)
 2) Tried defining IEEE_LITTLE_ENDIAN in various places
    a) at line 155
    b) at line 285
Comment 10 Michael Moll freebsd_committer freebsd_triage 2015-12-06 12:52:49 UTC
According to #bsdmips none of the ARMv5 processors we do support with the "arm" architecture does have VFP, so this might be just an accidental fix by some cross effects. I does work for me on armv6hf and I'm quite sure it would also work on armv6.

I tried to tinker around on my old Sheevaplug to get more insights, but it seems clang is broken on -CURRENT (see https://lists.freebsd.org/pipermail/freebsd-arm/2015-October/012491.html ff.).

-> assigning ticket back to ports pool
Comment 11 Kubilay Kocak freebsd_committer freebsd_triage 2015-12-24 18:13:02 UTC
Correctly assign to MAINTAINER
Comment 12 Walter Schwarzenfeld 2018-01-12 13:07:56 UTC
Maintainer feedback?
Comment 13 Rene Ladan freebsd_committer freebsd_triage 2019-01-01 13:43:02 UTC
Expired port removed, no recent updates.