Closed Bug 670315 Opened 13 years ago Closed 13 years ago

Add option to use GNU libstdc++ under Android NDK5

Categories

(Firefox Build System :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
mozilla8

People

(Reporter: jchen, Assigned: jchen)

References

Details

Attachments

(1 file, 3 obsolete files)

Currently we use STLPort under NDK5, but it's possible to use libstdc++ as well. NDK5 actually includes a copy of libstdc++ but it was compiled without wchar_t support and apparently IPC code requires it. So it's necessary to replace NDK5's copy of libstdc++ if we want to use it. A version with wchar_t support is available at http://people.mozilla.org/~nchen/gnu-libstdc++.tar.bz2

The attached patch checks if MOZ_USE_GNU_LIBSTDCXX is set and switches to using libstdc++ instead of STLPort. It also fixes some problems with the build flags. I don't know how to add a proper config option, so this patch may need some major rework.
Depends on: 617115
adding a configure flag is pretty strait forward. You probably want a boolean, so --enable-profiling is a good one to mimic:
http://mxr.mozilla.org/mozilla-central/source/configure.in#1804
Renamed flag to --enable-android-libstdcxx because it's only applicable to Android
Assignee: nobody → nchen
Attachment #544951 - Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #545281 - Flags: review?(khuey)
Comment on attachment 545281 [details] [diff] [review]
Patch to add --enable-android-libstdcxx option (v2)

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

This looks fine, I'm just assuming the paths are right though ....

::: configure.in
@@ +326,5 @@
> +          STL_LIBS="-lstdc++"
> +          STL_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a"
> +       fi
> +    else
> +       if test -e "$android_ndk/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.a" ; then

nit: elif

::: js/src/configure.in
@@ +317,5 @@
> +          STL_LIBS="-lstdc++"
> +          STL_LDFLAGS="-L$android_ndk/sources/cxx-stl/gnu-libstdc++/libs/armeabi-v7a"
> +       fi
> +    else
> +       if test -e "$android_ndk/sources/cxx-stl/stlport/libs/armeabi-v7a/libstlport_static.a" ; then

nit elif
Attachment #545281 - Flags: review?(khuey) → review+
Carry over khuey's r+
Attachment #545281 - Attachment is obsolete: true
Attachment #546051 - Flags: review+
Patch conflicts with bug 671346.
Keywords: checkin-needed
Requesting review again because of additional change to accommodate bug 671346. Thanks!
Attachment #546051 - Attachment is obsolete: true
Attachment #546590 - Flags: review?(khuey)
Keywords: checkin-needed
http://hg.mozilla.org/mozilla-central/rev/f06039afefb9
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla8
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: