Bug 231462

Summary: security/php72-hash: fix build with mips64, powerpc64
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Jochen Neumeister <joneum>
Status: Closed FIXED    
Severity: Affects Only Me CC: joneum, linimon
Priority: --- Flags: bugzilla: maintainer-feedback? (tz)
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
v2
none
v3 none

Description Piotr Kubaj freebsd_committer freebsd_triage 2018-09-18 18:51:42 UTC
Created attachment 197214 [details]
patch

It looks like even though HAVE_SLOW_HASH3 is properly defined in config.h on big-endian architectures, it's not actually defined during build process, which results in the default path being taken.

The workaround is to define HAVE_SLOW_HASH3 manually on mips64 and powerpc64. I tried doing it in lang/php72/Makefile.ext, but it turns out that ${ARCH} isn't defined in there, so I had to resort to patching Makefile directly.

Tested on CURRENT with powerpc64.
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2018-09-18 20:05:26 UTC
Created attachment 197217 [details]
v2

Corrected for powerpc and powerpcspe compatibility.
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2018-10-10 18:09:29 UTC
Created attachment 198011 [details]
v3

Better fix, uses Makefile.ext.
Comment 3 commit-hook freebsd_committer freebsd_triage 2018-11-02 16:12:37 UTC
A commit references this bug:

Author: joneum
Date: Fri Nov  2 16:12:06 UTC 2018
New revision: 483821
URL: https://svnweb.freebsd.org/changeset/ports/483821

Log:
  security/php72-hash: fix build with GCC-based architectures

  Unbreak this Port on mips64 and powerpc64

  PR:		231462 232160
  Reported by:	Piotr Kubaj <pkubaj@anongoth.pl>
  Approved by:	tz (implicit)
  Sponsored by:	Netzkommune GmbH

Changes:
  head/lang/php72/Makefile.ext
  head/security/php72-hash/Makefile