Last Comment Bug 676589 - xpcom/configure ios build fixes
: xpcom/configure ios build fixes
Status: RESOLVED FIXED
[iOS] fixed-in-bs
:
Product: Core
Classification: Components
Component: XPCOM (show other bugs)
: unspecified
: All iOS 4
: -- normal (vote)
: mozilla9
Assigned To: Ted Mielczarek [:ted.mielczarek]
:
: Nathan Froyd [:froydnj]
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-08-04 11:03 PDT by Doug Turner (:dougt)
Modified: 2011-08-25 01:53 PDT (History)
5 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
patch to build xpcom on ios (25.10 KB, patch)
2011-08-04 11:03 PDT, Doug Turner (:dougt)
khuey: review+
Details | Diff | Splinter Review

Description Doug Turner (:dougt) 2011-08-04 11:03:11 PDT
Created attachment 550751 [details] [diff] [review]
patch to build xpcom on ios
Comment 1 Doug Turner (:dougt) 2011-08-04 11:03:23 PDT
patch from ted.
Comment 2 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-08-07 19:07:47 PDT
Is XP_MACOSX defined for iOS with this patch?  That seems ... counterintuitive?
Comment 3 Ted Mielczarek [:ted.mielczarek] 2011-08-08 04:13:14 PDT
Yes, it is. It's simpler that way because iOS uses the same Darwin kernel as desktop OS X, and we condition a *lot* of things on XP_MACOSX. Note that the widget toolkit is different, so we define MOZ_WIDGET_TOOLKIT=uikit, and define MOZ_WIDGET_UIKIT in the preprocessor instead of MOZ_WIDGET_COCOA.

I mean, we *could* rename it to MOZ_DARWIN or something, but that seems like a lot of unnecessary work.
Comment 4 Kyle Huey [:khuey] (Exited; not receiving bugmail, email if necessary) 2011-08-08 07:35:40 PDT
Comment on attachment 550751 [details] [diff] [review]
patch to build xpcom on ios

Review of attachment 550751 [details] [diff] [review]:
-----------------------------------------------------------------

::: config/config.mk
@@ +516,4 @@
>  endif # WINNT && !GNU_CC
>  
>  ifeq ($(OS_ARCH),Darwin)
>  # Darwin doesn't cross-compile, so just set both types of flags here.

This is no longer true

::: configure.in
@@ +2093,5 @@
> +    AC_TRY_LINK(,[return 0;],
> +                ac_cv_have_framework_exceptionhandling="yes",
> +                ac_cv_have_framework_exceptionhandling="no")
> +    AC_MSG_RESULT([$ac_cv_have_framework_exceptionhandling])
> +    if test  "$ac_cv_have_framework_exceptionhandling" = "yes"; then

Nit: 1 space

@@ +5144,5 @@
>      MOZ_PDF_PRINTING=1
>      ;;
>  
>  cairo-cocoa)
> +    # Check if we have the Cocoa framework, or if we're targeting Cocoa Touch

This is pretty nasty, but ok.

@@ +8151,1 @@
>  AC_MSG_CHECKING([for correct temporary object destruction order])

Do we still need this check at all?

Also, what does Android do here?  Just run this on the host and not learn anything useful?
Comment 5 Ted Mielczarek [:ted.mielczarek] 2011-08-08 07:39:23 PDT
Comment on attachment 550751 [details] [diff] [review]
patch to build xpcom on ios

Review of attachment 550751 [details] [diff] [review]:
-----------------------------------------------------------------

::: configure.in
@@ +8151,1 @@
>  AC_MSG_CHECKING([for correct temporary object destruction order])

This is a little goofy. For iOS, you can target the simulator, which means you build x86 binaries that are linked to x86 UIKit frameworks. The resulting binaries won't run from the shell (because the library paths aren't set correctly), but it doesn't look like a cross-compile to configure (because it's x86->x86, and until you link with -framework UIKit the binaries will run in the shell). I wound up forcing CROSS_COMPILE in the mozconfig and sprinkling these checks around a few places to make it work. It's not ideal, but I didn't have a better plan.
Comment 6 Ted Mielczarek [:ted.mielczarek] 2011-08-22 08:10:19 PDT
http://hg.mozilla.org/projects/build-system/rev/4d17fe7b47b6
Comment 7 Mike Hommey [:glandium] 2011-08-25 01:53:30 PDT
http://hg.mozilla.org/mozilla-central/rev/4d17fe7b47b6

Note You need to log in before you can comment on or make changes to this bug.