Closed Bug 676589 Opened 13 years ago Closed 13 years ago

xpcom/configure ios build fixes

Categories

(Core :: XPCOM, defect)

All
iOS 4
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla9

People

(Reporter: dougt, Assigned: ted)

Details

(Whiteboard: [iOS] fixed-in-bs)

Attachments

(1 file)

      No description provided.
Attachment #550751 - Flags: review?(khuey)
patch from ted.
Is XP_MACOSX defined for iOS with this patch?  That seems ... counterintuitive?
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.
Assignee: nobody → ted.mielczarek
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?
Attachment #550751 - Flags: review?(khuey) → review+
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.
OS: Mac OS X → iOS 4
Hardware: x86 → All
http://hg.mozilla.org/mozilla-central/rev/4d17fe7b47b6
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla9
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: