Bug 191909 - [patch] devel/libffi: Enable MIPS support
Summary: [patch] devel/libffi: Enable MIPS support
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: mips Any
: --- Affects Only Me
Assignee: Sean Bruno
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-17 04:10 UTC by Sean Bruno
Modified: 2014-10-29 15:36 UTC (History)
3 users (show)

See Also:


Attachments
patch to configure to enable build support on mips (3.75 KB, text/plain)
2014-07-17 04:10 UTC, Sean Bruno
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sean Bruno freebsd_committer 2014-07-17 04:10:01 UTC
Created attachment 144739 [details]
patch to configure to enable build support on mips

MIPS builds of devel/libffi are aborting due to lack of declared support.

Adds mips*-*-freebsd* to configure and #ifdef's out call to cacheflush(),
which doesn't seem to exist currently on FreeBSD/mips64 in any form.


redports builds are at:
https://redports.org/buildarchive/20140717023902-46396/

phabric review at:
https://phabric.freebsd.org/D428
Comment 1 John Marino freebsd_committer 2014-07-20 15:18:06 UTC
over to maintainer
Comment 2 Niclas Zeising freebsd_committer 2014-07-22 17:44:01 UTC
I don't have any mips hardware, and therefore can't test this.  There might be a reason that mips on FreeBSD isn't supported yet.
Please not also that this port needs an update, which I will work on as time permits.

Have you tested this on mips (runtime), or just compiled it?
Comment 3 Sean Bruno freebsd_committer 2014-07-22 17:50:52 UTC
I'm using QEMU at this time to test builds and whatnot.  We're trying to bootstrap mips/mips64 and this is one of the roadblocks.

qemu-user allows me to build a mips chroot and then enter it, emulating needed instructions in userland.
Comment 4 Stacey Son freebsd_committer 2014-07-22 17:52:22 UTC
I am currently using it on an Ubiquiti Networks Edge Router Lite (ERL) running FreeBSD/mips64 -current. I am planning on fixing the inability to flush the icache from userspace which will change this patch a bit. Currently the patch just ignores the fact there isn't a mechanism to do this from user space.  A command to do this needs to be added to the sysarch() system call for FreeBSD/mips.  Maybe another problem report should be added stating this that blocks this one.
Comment 5 Niclas Zeising freebsd_committer 2014-07-22 18:00:26 UTC
Thank you for your comments.  I'll look into comitting this as soon as I can.
Feel free to improve the patch, and also get something ready to send to upstream if needed.
Comment 6 Sean Bruno freebsd_committer 2014-10-29 13:47:33 UTC
If there's no objections, I'll get mentor approval to apply this today.  This is currently blocking the build of 7000+ ports on mips/mips64
Comment 8 Sean Bruno freebsd_committer 2014-10-29 14:39:37 UTC
Doesn't seem to break amd64/i386.  :-)
Comment 9 commit-hook freebsd_committer 2014-10-29 15:31:33 UTC
A commit references this bug:

Author: sbruno
Date: Wed Oct 29 15:31:02 UTC 2014
New revision: 371681
URL: https://svnweb.freebsd.org/changeset/ports/371681

Log:
  Add support for mips/mips64 targets.

  Unblocks 7k ports building for these targets.

  PR:		191909
  Submitted by:	sson
  Reviewed by:	bapt (mentor)

Changes:
  head/devel/libffi/Makefile
  head/devel/libffi/files/patch-configure
  head/devel/libffi/files/patch-src__mips__ffi.c
  head/devel/libffi/files/patch-src__mips__ffitarget.h