Closed Bug 745956 Opened 13 years ago Closed 13 years ago

package NDK with gold for developer usage

Categories

(Release Engineering :: General, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: jhford, Assigned: jhford)

References

Details

Attachments

(2 files, 1 obsolete file)

We should package an NDK that contains as the default linker for general developer usage. Lets use 675572 as reference. This should be for Mac and Linux.
I am seeing issues building gold on Mac /usr/bin/g++-4.2 -DHAVE_CONFIG_H -I. -I/Users/cltbld/android-ndk-r7c/src/build/../binutils/binutils-2.22/gold -I/Users/cltbld/android-ndk-r7c/src/build/../binutils/binutils-2.22/gold -I/Users/cltbld/android-ndk-r7c/src/build/../binutils/binutils-2.22/gold/../include -I/Users/cltbld/android-ndk-r7c/src/build/../binutils/binutils-2.22/gold/../elfcpp -DLOCALEDIR="\"/Users/cltbld/android-ndk-r7c/ndk-r7c-gold/toolchains/arm-linux-androideabi-4.6.3/prebuilt/darwin-x86_64/share/locale\"" -DBINDIR="\"/Users/cltbld/android-ndk-r7c/ndk-r7c-gold/toolchains/arm-linux-androideabi-4.6.3/prebuilt/darwin-x86_64/bin\"" -DTOOLBINDIR="\"/Users/cltbld/android-ndk-r7c/ndk-r7c-gold/toolchains/arm-linux-androideabi-4.6.3/prebuilt/darwin-x86_64/arm-linux-androideabi/bin\"" -W -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=main.o -g -O2 -MT main.o -MD -MP -MF .deps/main.Tpo -c -o main.o /Users/cltbld/android-ndk-r7c/src/build/../binutils/binutils-2.22/gold/main.cc cc1plus: warnings being treated as errors /Users/cltbld/android-ndk-r7c/src/build/../binutils/binutils-2.22/gold/main.cc: In function 'int main(int, char**)': /Users/cltbld/android-ndk-r7c/src/build/../binutils/binutils-2.22/gold/main.cc:145: warning: suggest a space before ';' or explicit braces around empty body in 'while' statement /Users/cltbld/android-ndk-r7c/src/build/../binutils/binutils-2.22/gold/main.cc:146: warning: suggest a space before ';' or explicit braces around empty body in 'while' statement make[5]: *** [main.o] Error 1 make[4]: *** [all-recursive] Error 1 make[3]: *** [all] Error 2 make[2]: *** [all-gold] Error 2 make[1]: *** [all] Error 2 make: *** [stmp-build-target-binutils] Error 2
The two lines with warnings (as errors) are bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); Which are functions from the libintl package. I remember there being something strange about the localization packages on Mac. I'm going to try to build binutils --disable-nls if that isn't already what's done
This patch changes the no-op libintl definitions to use 'while (0) {}' instead of 'while (0)' and is needed to build on XCode 4.1's i686-apple-darwin11-gcc-4.2.1
same patch but with a working header that patch understands
Attachment #615842 - Attachment is obsolete: true
This script will download, patch and build the android ndk toolchain for Mac OS X as 64bit binaries. I'll try an android build using this toolchain now.
I compiled a simple hello world application using the toolchain I built on my mac using gold as the default. The result was linked with gold by default [cltbld@linux-ix-slave01 ~]$ /tools/binutils-2.22/bin/readelf -n a.out Notes at offset 0x00000388 with length 0x0000001c: Owner Data size Description GNU 0x00000009 NT_GNU_GOLD_VERSION (gold version)
Attachment #615864 - Attachment mime type: application/x-sh → text/plain
Depends on: 746774
Were you going to upload a Linux NDK as well? I think that'd cover everything we need. I guess this bug just covers uploading packages for developers, and bug 675572 was "get it on the build farm"?
I'll write up a quick blogpost discussing this but otherwise, i think we're done here.
Blogposts done, documentation updated. We are done here
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Product: mozilla.org → Release Engineering
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: