Closed Bug 598261 Opened 9 years ago Closed 9 years ago

Cannot cross compile JS for Android on OSX host

Categories

(Firefox Build System :: General, defect)

x86
macOS
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED
mozilla2.0b7

People

(Reporter: mossop, Assigned: mossop)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached patch patch rev 1 (obsolete) — Splinter Review
There are a couple of build config errors in JS that make it impossible to compile for android on an OSX host.

Firstly it attempts to link against -lobjc and defines LIBXUL_LIBS whenever the build host is OSX when it should only do that if the build target is OSX.

Secondly only certain parts of the toolchain are passed through to the libffi build. In particular RANLIB needs to point to the NDK versions or the OS versions are used. This doesn't seem to cause a problem if Linux is the host since it seems to work just like the NDK version, but the OSX version adds some "SYMDEF SORTED" entry that confuses things (it is normally ignored on an OSX compile http://mxr.mozilla.org/mozilla-central/source/js/src/config/rules.mk#1193). The patch just makes sure to pass through all the binaries for the toolchain.
Attached patch patch rev 1 (obsolete) — Splinter Review
Assignee: nobody → dtownsend
Attachment #477048 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attached patch patch rev 2Splinter Review
Forgot one thing, on OSX force-big-endian and force-little-endian are ignored right now producing some amusing results.
Attachment #477049 - Attachment is obsolete: true
Attachment #479231 - Flags: review?(ted.mielczarek)
Attachment #479231 - Flags: review?(ted.mielczarek) → review+
Comment on attachment 479231 [details] [diff] [review]
patch rev 2

I'd like approval to land this for 2.0 so that OSX developers can hack on Android without needing a VM, I think the risk should be minimal, any issues should be caught immediately on landing (all tests have passed on tryserver already anyway)
Attachment #479231 - Flags: approval2.0?
Attachment #479231 - Flags: approval2.0? → approval2.0+
Landed: http://hg.mozilla.org/mozilla-central/rev/f0be8a373b08
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla2.0b8
Target Milestone: mozilla2.0b8 → mozilla2.0b7
Duplicate of this bug: 571695
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.