Merge "Switch to Clang 3.6."
diff --git a/core/combo/arch/x86/x86-atom.mk b/core/combo/arch/x86/atom.mk
similarity index 100%
rename from core/combo/arch/x86/x86-atom.mk
rename to core/combo/arch/x86/atom.mk
diff --git a/core/combo/include/arch/target_linux-x86/AndroidConfig.h b/core/combo/include/arch/target_linux-x86/AndroidConfig.h
index 6cdce4e..e294167 100644
--- a/core/combo/include/arch/target_linux-x86/AndroidConfig.h
+++ b/core/combo/include/arch/target_linux-x86/AndroidConfig.h
@@ -44,7 +44,7 @@
  * agree on the same size.  For desktop systems, use 64-bit values,
  * because some of our libraries (e.g. wxWidgets) expect to be built that way.
  */
-#if __LP64__
+#if defined(__LP64__)
 #define _FILE_OFFSET_BITS 64
 #endif
 
diff --git a/core/config.mk b/core/config.mk
index c9453ef..f51a29a 100644
--- a/core/config.mk
+++ b/core/config.mk
@@ -69,10 +69,8 @@
 BUILD_HOST_STATIC_LIBRARY:= $(BUILD_SYSTEM)/host_static_library.mk
 BUILD_HOST_SHARED_LIBRARY:= $(BUILD_SYSTEM)/host_shared_library.mk
 BUILD_STATIC_LIBRARY:= $(BUILD_SYSTEM)/static_library.mk
-BUILD_RAW_STATIC_LIBRARY := $(BUILD_SYSTEM)/raw_static_library.mk
 BUILD_SHARED_LIBRARY:= $(BUILD_SYSTEM)/shared_library.mk
 BUILD_EXECUTABLE:= $(BUILD_SYSTEM)/executable.mk
-BUILD_RAW_EXECUTABLE:= $(BUILD_SYSTEM)/raw_executable.mk
 BUILD_HOST_EXECUTABLE:= $(BUILD_SYSTEM)/host_executable.mk
 BUILD_PACKAGE:= $(BUILD_SYSTEM)/package.mk
 BUILD_PHONY_PACKAGE:= $(BUILD_SYSTEM)/phony_package.mk
diff --git a/core/prebuilt.mk b/core/prebuilt.mk
index ba0e757..d3f9d1a 100644
--- a/core/prebuilt.mk
+++ b/core/prebuilt.mk
@@ -25,6 +25,10 @@
 ifneq ($(my_module_multilib),both)
 my_skip_non_preferred_arch := true
 endif # $(my_module_multilib)
+# For apps, we don't want to set up the prebuilt apk rule twice even if "LOCAL_MULTILIB := both".
+ifeq (APPS,$(LOCAL_MODULE_CLASS))
+my_skip_non_preferred_arch := true
+endif
 endif # $(my_module_arch_supported)
 
 ifndef my_skip_non_preferred_arch
diff --git a/core/raw_executable.mk b/core/raw_executable.mk
deleted file mode 100644
index b64173a..0000000
--- a/core/raw_executable.mk
+++ /dev/null
@@ -1,25 +0,0 @@
-LOCAL_MODULE_CLASS := EXECUTABLES
-LOCAL_MODULE_SUFFIX := 
-LOCAL_FORCE_STATIC_EXECUTABLE := true
-
-include $(BUILD_SYSTEM)/binary.mk
-
-$(LOCAL_BUILT_MODULE) : PRIVATE_ELF_FILE := $(intermediates)/$(PRIVATE_MODULE).elf
-$(LOCAL_BUILT_MODULE) : PRIVATE_LIBS := `$(TARGET_CC) -mthumb-interwork -print-libgcc-file-name`
-
-$(all_objects) : PRIVATE_TARGET_PROJECT_INCLUDES :=
-$(all_objects) : PRIVATE_TARGET_C_INCLUDES :=
-$(all_objects) : PRIVATE_TARGET_GLOBAL_CFLAGS :=
-$(all_objects) : PRIVATE_TARGET_GLOBAL_CPPFLAGS :=
-
-$(LOCAL_BUILT_MODULE): $(all_objects) $(all_libraries)
-	@$(mkdir -p $(dir $@)
-	@echo "target Linking: $(PRIVATE_MODULE)"
-	$(hide) $(TARGET_LD) \
-		$(addprefix --script ,$(PRIVATE_LINK_SCRIPT)) \
-		$(PRIVATE_RAW_EXECUTABLE_LDFLAGS) \
-		-o $(PRIVATE_ELF_FILE) \
-		$(PRIVATE_ALL_OBJECTS) \
-		--start-group $(PRIVATE_ALL_STATIC_LIBRARIES) --end-group \
-		$(PRIVATE_LIBS)
-	$(hide) $(TARGET_OBJCOPY) -O binary $(PRIVATE_ELF_FILE) $@
diff --git a/core/raw_static_library.mk b/core/raw_static_library.mk
deleted file mode 100644
index 14a404d..0000000
--- a/core/raw_static_library.mk
+++ /dev/null
@@ -1,4 +0,0 @@
-
-LOCAL_RAW_STATIC_LIBRARY:=true
-
-include $(BUILD_SYSTEM)/static_library_internal.mk