diff options
author | Andrew Hsieh <andrewhsieh@google.com> | 2013-08-07 14:40:27 +0800 |
---|---|---|
committer | Andrew Hsieh <andrewhsieh@google.com> | 2013-08-07 14:45:26 +0800 |
commit | 749efe457c4395c5a2396ec8685d494d2bfbad97 (patch) | |
tree | 73622039414c8981fc1eb8a23958e8c4a61be46c | |
parent | a9e66e7d82e71a308dbd51643da1d049faf3fb54 (diff) | |
download | ndk-749efe457c4395c5a2396ec8685d494d2bfbad97.tar.gz |
Misc fixes
1. Fixed to create bin/$TOOLCHAIN_PREFIX-clang[++] in addition to
bin/clang[++]
2. Fixed to rebuild stlport inside /tmp/ndk-$USER
3. Adjusted gcc local patch after 4.8.1 and mclinker rebase
4. Uncomment "@echo off" in find-win-host.cmd
5. Cleanup compiler-rt subdir
6. Use wine 1.7 for 64-bit testing
standalone toolchain
Change-Id: I7e74c4b67c81b2f7276e466c2899037cd100d73a
-rwxr-xr-x | build/tools/dev-cleanup.sh | 1 | ||||
-rwxr-xr-x | build/tools/make-standalone-toolchain.sh | 13 | ||||
-rw-r--r-- | build/tools/toolchain-patches/gcc/0006-Disable-libstdc-versioning.patch | 4 | ||||
-rw-r--r-- | build/tools/toolchain-patches/mclinker/0005-Fixed-darwin-ld.mcld-GNU-m-emulation-fail.patch | 2 | ||||
-rw-r--r-- | find-win-host.cmd | 2 | ||||
-rwxr-xr-x | tests/run-tests.sh | 2 |
6 files changed, 17 insertions, 7 deletions
diff --git a/build/tools/dev-cleanup.sh b/build/tools/dev-cleanup.sh index b13fdb159..71df0c059 100755 --- a/build/tools/dev-cleanup.sh +++ b/build/tools/dev-cleanup.sh @@ -45,6 +45,7 @@ for VERSION in $DEFAULT_GCC_VERSION_LIST; do rm -rf $DIR/$GNUSTL_SUBDIR/$VERSION done rm -rf $DIR/$LIBPORTABLE_SUBDIR +rm -rf $DIR/$COMPILER_RT_SUBDIR rm -f $DIR/ndk-stack* rm -f $DIR/ndk-depends* diff --git a/build/tools/make-standalone-toolchain.sh b/build/tools/make-standalone-toolchain.sh index 9f7f7145f..378502ead 100755 --- a/build/tools/make-standalone-toolchain.sh +++ b/build/tools/make-standalone-toolchain.sh @@ -85,6 +85,7 @@ if [ -z "$ARCH" ]; then ARCH=arm ;; esac + ARCH_INC=$ARCH log "Auto-config: --arch=$ARCH" else ARCH_INC=$ARCH @@ -301,18 +302,21 @@ if [ -n "$LLVM_VERSION" ]; then arm) # NOte: -target may change by clang based on the # presence of subsequent -march=armv7-a and/or -mthumb LLVM_TARGET=armv5te-none-linux-androideabi + TOOLCHAIN_PREFIX=$DEFAULT_ARCH_TOOLCHAIN_PREFIX_arm ;; x86) LLVM_TARGET=i686-none-linux-android + TOOLCHAIN_PREFIX=$DEFAULT_ARCH_TOOLCHAIN_PREFIX_x86 ;; mips) LLVM_TARGET=mipsel-none-linux-android + TOOLCHAIN_PREFIX=$DEFAULT_ARCH_TOOLCHAIN_PREFIX_mips ;; *) dump "ERROR: Unsupported NDK architecture!" esac # Need to remove '.' from LLVM_VERSION when constructing new clang name, - # otherwise clang3.1++ may still compile *.c code as C, not C++, which + # otherwise clang3.3++ may still compile *.c code as C, not C++, which # is not consistent with g++ LLVM_VERSION_WITHOUT_DOT=$(echo "$LLVM_VERSION" | sed -e "s!\.!!") mv "$TMPDIR/bin/clang${HOST_EXE}" "$TMPDIR/bin/clang${LLVM_VERSION_WITHOUT_DOT}${HOST_EXE}" @@ -351,6 +355,8 @@ else fi EOF chmod 0755 "$TMPDIR/bin/clang" "$TMPDIR/bin/clang++" + cp -a "$TMPDIR/bin/clang" "$TMPDIR/bin/$TOOLCHAIN_PREFIX-clang" + cp -a "$TMPDIR/bin/clang++" "$TMPDIR/bin/$TOOLCHAIN_PREFIX-clang++" if [ -n "$HOST_EXE" ] ; then cat > "$TMPDIR/bin/clang.cmd" <<EOF @@ -379,6 +385,8 @@ rem target/triple already spelled out. if ERRORLEVEL 1 exit /b 1 :done EOF + cp -a "$TMPDIR/bin/clang.cmd" "$TMPDIR/bin/$TOOLCHAIN_PREFIX-clang.cmd" + cp -a "$TMPDIR/bin/clang++.cmd" "$TMPDIR/bin/$TOOLCHAIN_PREFIX-clang++.cmd" fi fi @@ -440,10 +448,11 @@ copy_stl_libs () { ;; stlport) if [ "$ARCH_INC" != "$ARCH" ]; then - tmp_lib_dir=`mktemp -d` + tmp_lib_dir=$TMPDIR/stl $NDK_DIR/build/tools/build-cxx-stl.sh --stl=stlport --out-dir=$tmp_lib_dir --abis=unknown cp -p "`ls $tmp_lib_dir/sources/cxx-stl/stlport/libs/*/libstlport_static.a`" "$ABI_STL/lib/$ABI2/libstdc++.a" cp -p "`ls $tmp_lib_dir/sources/cxx-stl/stlport/libs/*/libstlport_shared.so`" "$ABI_STL/lib/$ABI2/libstlport_shared.so" + rm -rf $tmp_lib_dir else copy_file_list "$STLPORT_LIBS/$ABI" "$ABI_STL/lib/$ABI2" "libstlport_shared.so" cp -p "$STLPORT_LIBS/$ABI/libstlport_static.a" "$ABI_STL/lib/$ABI2/libstdc++.a" diff --git a/build/tools/toolchain-patches/gcc/0006-Disable-libstdc-versioning.patch b/build/tools/toolchain-patches/gcc/0006-Disable-libstdc-versioning.patch index d89fd149f..0f6f2427e 100644 --- a/build/tools/toolchain-patches/gcc/0006-Disable-libstdc-versioning.patch +++ b/build/tools/toolchain-patches/gcc/0006-Disable-libstdc-versioning.patch @@ -62,7 +62,7 @@ diff --git a/gcc-4.8/libstdc++-v3/src/Makefile.in b/gcc-4.8/libstdc++-v3/src/Mak index 69001b4..e875539 100644 --- a/gcc-4.8/libstdc++-v3/src/Makefile.in +++ b/gcc-4.8/libstdc++-v3/src/Makefile.in -@@ -336,7 +336,7 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) +@@ -335,7 +335,7 @@ AM_CPPFLAGS = $(GLIBCXX_INCLUDES) SUBDIRS = c++98 c++11 # Cross compiler support. @@ -71,7 +71,7 @@ index 69001b4..e875539 100644 @GLIBCXX_LDBL_COMPAT_FALSE@ldbl_compat_sources = @GLIBCXX_LDBL_COMPAT_TRUE@ldbl_compat_sources = compatibility-ldbl.cc parallel_compat_sources = \ -@@ -543,6 +543,9 @@ clean-toolexeclibLTLIBRARIES: +@@ -544,6 +544,9 @@ clean-toolexeclibLTLIBRARIES: libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES) $(libstdc___la_LINK) -rpath $(toolexeclibdir) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS) diff --git a/build/tools/toolchain-patches/mclinker/0005-Fixed-darwin-ld.mcld-GNU-m-emulation-fail.patch b/build/tools/toolchain-patches/mclinker/0005-Fixed-darwin-ld.mcld-GNU-m-emulation-fail.patch index 1b184b6be..aff63e984 100644 --- a/build/tools/toolchain-patches/mclinker/0005-Fixed-darwin-ld.mcld-GNU-m-emulation-fail.patch +++ b/build/tools/toolchain-patches/mclinker/0005-Fixed-darwin-ld.mcld-GNU-m-emulation-fail.patch @@ -15,7 +15,7 @@ diff --git a/tools/llvm-mcld/llvm-mcld.cpp b/tools/llvm-mcld/llvm-mcld.cpp index b5152e6..f7ddd90 100644 --- a/tools/llvm-mcld/llvm-mcld.cpp +++ b/tools/llvm-mcld/llvm-mcld.cpp -@@ -1016,12 +1016,12 @@ static Triple ParseEmulation(const std::string& pEmulation) +@@ -1018,12 +1018,12 @@ static Triple ParseEmulation(const std::string& pEmulation) { Triple result = StringSwitch<Triple>(pEmulation) .Case("armelf_linux_eabi", Triple("arm", "", "linux", "gnueabi")) diff --git a/find-win-host.cmd b/find-win-host.cmd index ad7212f24..2149b2500 100644 --- a/find-win-host.cmd +++ b/find-win-host.cmd @@ -1,4 +1,4 @@ -rem @echo off +@echo off rem This is a Windows cmd.exe script used to find windows host name. rem %1 is the env. var to set to the windows host name. diff --git a/tests/run-tests.sh b/tests/run-tests.sh index 125cf3a6b..2a1a6259d 100755 --- a/tests/run-tests.sh +++ b/tests/run-tests.sh @@ -382,7 +382,7 @@ if [ "$WINE" ]; then WINE=wine12 ;; *) - WINE=wine15 + WINE=wine17 NDK_BUILD_FLAGS="" # make.exe -B hangs in wine > 1.2.x if [ "$NDK_TOOLCHAIN_VERSION" != "4.4.3" ] ; then APP_LDFLAGS="$APP_LDFLAGS -fuse-ld=mcld" # 64-bit ld.gold can't run in any wine! |