Bug 231462 - security/php72-hash: fix build with mips64, powerpc64
Summary: security/php72-hash: fix build with mips64, powerpc64
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Jochen Neumeister
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-18 18:51 UTC by Piotr Kubaj
Modified: 2018-11-02 16:13 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (tz)


Attachments
patch (422 bytes, patch)
2018-09-18 18:51 UTC, Piotr Kubaj
no flags Details | Diff
v2 (416 bytes, patch)
2018-09-18 20:05 UTC, Piotr Kubaj
no flags Details | Diff
v3 (923 bytes, patch)
2018-10-10 18:09 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer 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 2018-09-18 20:05:26 UTC
Created attachment 197217 [details]
v2

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

Better fix, uses Makefile.ext.
Comment 3 commit-hook freebsd_committer 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