From 8ba9a6335becb20598187a3523dc94aab0456284 Mon Sep 17 00:00:00 2001 From: Evan McClain Date: Fri, 18 May 2012 01:28:26 -0400 Subject: [PATCH] Fix build on gcc 4.6. Several programs were not linked against libcrecovery which has the __system function. Change-Id: I12b33a9157ab74825129896d0f2177fa83638464 Signed-off-by: Evan McClain --- bmlutils/Android.mk | 3 +++ bmlutils/bmlutils.c | 3 ++- flashutils/Android.mk | 6 +++--- updater/Android.mk | 4 ++-- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/bmlutils/Android.mk b/bmlutils/Android.mk index 6d9ab83..de687f8 100644 --- a/bmlutils/Android.mk +++ b/bmlutils/Android.mk @@ -10,6 +10,9 @@ $(foreach board_define,$(BOARD_RECOVERY_DEFINES), \ ) \ ) +LOCAL_STATIC_LIBRARIES := libcrecovery +LOCAL_C_INCLUDES := bootable/recovery/libcrecovery + LOCAL_SRC_FILES := bmlutils.c LOCAL_MODULE := libbmlutils LOCAL_MODULE_TAGS := eng diff --git a/bmlutils/bmlutils.c b/bmlutils/bmlutils.c index a7b09b4..609ab86 100644 --- a/bmlutils/bmlutils.c +++ b/bmlutils/bmlutils.c @@ -20,7 +20,8 @@ #include #include -extern int __system(const char *command); +#include + #define BML_UNLOCK_ALL 0x8A29 ///< unlock all partition RO -> RW #ifndef BOARD_BML_BOOT diff --git a/flashutils/Android.mk b/flashutils/Android.mk index 615265a..0476f1b 100644 --- a/flashutils/Android.mk +++ b/flashutils/Android.mk @@ -24,7 +24,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := flash_image.c LOCAL_MODULE := flash_image LOCAL_MODULE_TAGS := optional -LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils +LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcrecovery LOCAL_SHARED_LIBRARIES := libcutils libc include $(BUILD_EXECUTABLE) @@ -32,7 +32,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := dump_image.c LOCAL_MODULE := dump_image LOCAL_MODULE_TAGS := optional -LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils +LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcrecovery LOCAL_SHARED_LIBRARIES := libcutils libc include $(BUILD_EXECUTABLE) @@ -40,7 +40,7 @@ include $(CLEAR_VARS) LOCAL_SRC_FILES := erase_image.c LOCAL_MODULE := erase_image LOCAL_MODULE_TAGS := optional -LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils +LOCAL_STATIC_LIBRARIES := libflashutils libmtdutils libmmcutils libbmlutils libcrecovery LOCAL_SHARED_LIBRARIES := libcutils libc include $(BUILD_EXECUTABLE) diff --git a/updater/Android.mk b/updater/Android.mk index 86c4bb7..d859c7b 100644 --- a/updater/Android.mk +++ b/updater/Android.mk @@ -30,7 +30,7 @@ LOCAL_STATIC_LIBRARIES += libflashutils libmtdutils libmmcutils libbmlutils LOCAL_STATIC_LIBRARIES += $(TARGET_RECOVERY_UPDATER_LIBS) $(TARGET_RECOVERY_UPDATER_EXTRA_LIBS) LOCAL_STATIC_LIBRARIES += libapplypatch libedify libmtdutils libminzip libz LOCAL_STATIC_LIBRARIES += libmincrypt libbz -LOCAL_STATIC_LIBRARIES += libminelf +LOCAL_STATIC_LIBRARIES += libminelf libcrecovery LOCAL_STATIC_LIBRARIES += libcutils libstdc++ libc LOCAL_C_INCLUDES += $(LOCAL_PATH)/.. @@ -73,4 +73,4 @@ LOCAL_MODULE := updater LOCAL_FORCE_STATIC_EXECUTABLE := true -include $(BUILD_EXECUTABLE) \ No newline at end of file +include $(BUILD_EXECUTABLE)