Closed
Bug 616057
Opened 14 years ago
Closed 13 years ago
Rebuild Android NDK v5 with PIC
Categories
(Release Engineering :: General, defect)
Tracking
(fennec+)
RESOLVED
INVALID
Tracking | Status | |
---|---|---|
fennec | + | --- |
People
(Reporter: mwu, Assigned: bear)
References
Details
(Keywords: mobile, perf, Whiteboard: [ts][mobile], mobilestartupshrink)
I'd like to get the NDK rebuilt with -fPIC so we can remove most of the text relocations in the libraries we build on Android. Text relocations slow down startup and increase memory usage. I basically did this to get it building with -fPIC: --- a/build/tools/patches/005-flags.patch +++ b/build/tools/patches/005-flags.patch @@ -6,8 +6,8 @@ index 670b620..06c95e9 100644 LDFLAGS_FOR_TARGET=-mandroid CFLAGS_FOR_TARGET+= -DANDROID -D__ANDROID__ -+CFLAGS_FOR_TARGET+= -fexceptions -+CXXFLAGS_FOR_TARGET+= -frtti ++CFLAGS_FOR_TARGET+= -fexceptions -fPIC ++CXXFLAGS_FOR_TARGET+= -frtti -fPIC # Helper prefix-list = $(foreach e, $(2), $(join $1, $e)) I followed the latest instructions on the crystax site to build it. (which are a little different now.. the source pulling part pulls code from a specific date now)
Assignee | ||
Updated•14 years ago
|
Assignee: nobody → bear
Comment 2•13 years ago
|
||
From bug 646843: Mike Hommey [:glandium]: Currently libgcc.a and libstdc++.a are not built as PIC. From my experiments, this should get us between 2 and 5% less time spent before main(), provided bug 646815 is fixed as well.
Updated•13 years ago
|
Whiteboard: [fennec-4.1?]
Comment 3•13 years ago
|
||
Bear - What's the status here?
tracking-fennec: --- → ?
Whiteboard: [fennec-4.1?]
Assignee | ||
Comment 4•13 years ago
|
||
(In reply to comment #3) > Bear - What's the status here? it's on my task list. right now i'm buildduty and will get back to it after buildduty.
Updated•13 years ago
|
tracking-fennec: ? → 7+
Updated•13 years ago
|
Comment 5•13 years ago
|
||
Bear is working on deploying the r5 NDK via puppet right now (Bug 657723). Once that's done, we'll revisit this bug and re-compile r5 with -fPIC.
Comment 6•13 years ago
|
||
From bug 646843: From my experiments, all that is needed is to add --with-pic as a compile option to gcc (which I did through build/tools/build-gcc.sh), and add -fPIC to libgcc config options (which I did through the TARGET_LIBGCC2_CFLAGS variable in src/gcc/gcc-4.4.0/gcc/config/arm/t-arm-softfp, though there's probably a better place)
Updated•13 years ago
|
Whiteboard: [ts] → [ts][mobile]
Updated•13 years ago
|
tracking-fennec: 7+ → +
Updated•13 years ago
|
Whiteboard: [ts][mobile] → [ts][mobile], mobilestartupshrink
Assignee | ||
Updated•13 years ago
|
Summary: Rebuild Android NDK with PIC → Rebuild Android NDK v5 with PIC
Assignee | ||
Comment 7•13 years ago
|
||
edited bug title to be very clear that we will be compiling only the r5 NDK with -fPIC support
Comment 8•13 years ago
|
||
glandium noted in IRC that PIC support may already be in NDK5.
Assignee | ||
Comment 9•13 years ago
|
||
yep, good catch - according to http://groups.google.com/group/android-ndk/browse_thread/thread/9fd148aa92a6fab6 PIC is available and enabled by default with NDK5
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → INVALID
Updated•11 years ago
|
Product: mozilla.org → Release Engineering
You need to log in
before you can comment on or make changes to this bug.
Description
•