Merge "Warn if shell isn't bash"
diff --git a/build/core/build-binary.mk b/build/core/build-binary.mk
index e6710f2..ebdf15b 100644
--- a/build/core/build-binary.mk
+++ b/build/core/build-binary.mk
@@ -46,7 +46,7 @@
 $(cleantarget): PRIVATE_CLEAN_FILES := $(LOCAL_BUILT_MODULE) \
                                        $($(my)OBJS)
 else
-$(cleantarget): PRIVATE_CLEAN_FILES := ($(my)OBJS)
+$(cleantarget): PRIVATE_CLEAN_FILES := $($(my)OBJS)
 endif
 $(cleantarget)::
 	@$(HOST_ECHO) "Clean: $(PRIVATE_MODULE) $(PRIVATE_TEXT)"
diff --git a/build/core/definitions.mk b/build/core/definitions.mk
index 8d4c687..b9d4d46 100644
--- a/build/core/definitions.mk
+++ b/build/core/definitions.mk
@@ -396,6 +396,7 @@
     FILTER_ASM \
     CPP_FEATURES \
     SHORT_COMMANDS \
+    BUILT_MODULE_NOT_COPIED \
 
 # The following are generated by the build scripts themselves
 
diff --git a/build/tools/build-gcc.sh b/build/tools/build-gcc.sh
index 55504a7..fda7336 100755
--- a/build/tools/build-gcc.sh
+++ b/build/tools/build-gcc.sh
@@ -395,7 +395,10 @@
     ARCHIVE="$TOOLCHAIN-$HOST_TAG.tar.bz2"
     SUBDIR=$(get_toolchain_install_subdir $TOOLCHAIN $HOST_TAG)
     dump "Packaging $ARCHIVE"
-    pack_archive "$PACKAGE_DIR/$ARCHIVE" "$NDK_DIR" "$SUBDIR"
+  # exlude ld.mcld
+    pack_archive "$PACKAGE_DIR/$ARCHIVE" "$NDK_DIR" "$SUBDIR" \
+        --exclude=$SUBDIR/bin/$ABI_CONFIGURE_TARGET-ld.mcld${HOST_EXE} \
+        --exclude=$SUBDIR/$ABI_CONFIGURE_TARGET/bin/ld.mcld${HOST_EXE}
 fi
 
 dump "Done."
diff --git a/build/tools/package-release.sh b/build/tools/package-release.sh
index 964ceea..f4274d5 100755
--- a/build/tools/package-release.sh
+++ b/build/tools/package-release.sh
@@ -519,6 +519,8 @@
     ARCHIVE=$BIN_RELEASE
     if [ "$TRY64" = "yes" ]; then
         ARCHIVE=`name64 $ARCHIVE`
+    elif [ "$SYSTEM" = "windows" ]; then
+        ARCHIVE=$ARCHIVE-x86
     fi
     case "$SYSTEM" in
         windows)
diff --git a/docs/ANDROID-MK.html b/docs/ANDROID-MK.html
index accc01f..66f10a8 100644
--- a/docs/ANDROID-MK.html
+++ b/docs/ANDROID-MK.html
@@ -229,12 +229,19 @@
 
 TARGET_ARCH_ABI
     Name of the target CPU+ABI when this Android.mk is parsed.
-    Two values are supported at the moment:
+    Four values are supported at the moment:
 
        armeabi
             For ARMv5TE
 
        armeabi-v7a
+            For ARMv7
+
+       x86
+            For i686
+
+       mips
+            For mips-r1
 
     NOTE: Up to Android NDK 1.6_r1, this variable was simply defined
           as 'arm'. However, the value has been redefined to better
diff --git a/docs/CHANGES.html b/docs/CHANGES.html
index 2273f35..dd55a30 100644
--- a/docs/CHANGES.html
+++ b/docs/CHANGES.html
@@ -40,12 +40,6 @@
   This feature is experimental now but welcome to try and report issues.
   Please find project page: https://code.google.com/p/mclinker/
 
-- Enabled OpenMP for GCC 4.4.3/4.6/4.7:  Add the following flags
-     LOCAL_CFLAGS += -fopenmp
-     LOCAL_LDFLAGS += -fopenmp
-
-  Please find examples in tests/device/test-openmp
-
 - ndk-build now uses topological sort for module dependencies, ie.
   it automatically sorts out the order of libraries specified in
   LOCAL_STATIC_LIBRARIES, LOCAL_WHOLE_STATIC_LIBRARIES and
@@ -67,6 +61,7 @@
   See http://b.android.com/52732
 
 - Fixed GCC/ARM 4.6/4.7 fails to link code using 64-bit atomic built-in
+  functions
   See http://b.android.com/41297
 
 - Fixed GCC 4.7 linker error reads like
@@ -218,7 +213,7 @@
 - Gabi++ and STLport static libraries are now built with hidden
   visibility except for EH helpers
 
-- STLport in ARM is now built with thumb
+- STLport in ARM is now built in thumb mode
 
 - Added support for std::set_new_handler in Gabi++
   See http://b.android.com/52805
@@ -232,7 +227,7 @@
 - Removed __ARM_ARCH_5*__ from ARM toolchains/*/setup.mk
   See http://b.android.com/21132
 
-- Built additional GNU libstdc++ libaries in thumb for ARM
+- Built additional GNU libstdc++ libaries in thumb mode for ARM
 
 - Enabled MIPS floating-point madd/msub/nmadd/nmsub/recip/rsqrt
   instructions with 32-bit FPU
diff --git a/ndk-build b/ndk-build
index a1d8e9e..95520f5 100755
--- a/ndk-build
+++ b/ndk-build
@@ -317,7 +317,7 @@
             --use-analyzer $PROGDIR/toolchains/llvm-${DEFAULT_LLVM_VERSION}/prebuilt/$HOST_TAG/bin/${ABI}/analyzer \
             --use-cc ${TOOLCHAIN_PREFIX}gcc \
             --use-c++ ${TOOLCHAIN_PREFIX}g++ \
-            --status-bugs -v -v \
+            --status-bugs \
             $GNUMAKE -f $PROGDIR/build/core/build-local.mk "$@" APP_ABI=$ABI
     done
 else
diff --git a/sources/cxx-stl/gabi++/include/unwind-arm.h b/sources/cxx-stl/gabi++/include/unwind-arm.h
index fff204b..d3f697e 100644
--- a/sources/cxx-stl/gabi++/include/unwind-arm.h
+++ b/sources/cxx-stl/gabi++/include/unwind-arm.h
@@ -56,7 +56,7 @@
 typedef struct _Unwind_Context _Unwind_Context;
 typedef uint32_t _Unwind_EHT_Header;
 
-typedef struct _Unwind_Control_Block {
+struct _Unwind_Control_Block {
   uint64_t exception_class; // Compatible with Itanium ABI
   void (*exception_cleanup)(_Unwind_Reason_Code, _Unwind_Control_Block*);
 
@@ -85,7 +85,7 @@
   } pr_cache;
 
   long long int : 0;  // Force alignment of next item to 8-byte boundary
-} _Unwind_Control_Block;
+};
 
 // This makes our code more simple
 typedef _Unwind_Control_Block _Unwind_Exception;
diff --git a/tests/build/flto/jni/Android.mk b/tests/build/flto/jni/Android.mk
index 104076b..a9920c8 100644
--- a/tests/build/flto/jni/Android.mk
+++ b/tests/build/flto/jni/Android.mk
@@ -6,7 +6,7 @@
 
 FLTO_FLAG := -flto
 ifneq ($(filter clang%,$(NDK_TOOLCHAIN_VERSION)),)
-ifeq ($(TARGET_ARCH),mips)
+ifeq ($(TARGET_ARCH_ABI),mips)
 # clang does LTO via gold plugin, but gold doesn't support MIPS yet
 FLTO_FLAG :=
 endif