Note: Build patch for OMAP4 4AI.1.3 on Ubuntu 12.04 x64 machine

follow http://www.omappedia.org/wiki/4AI.1.4_OMAP4_Icecream_Sandwich_Release_Notes to setup my build machine for Android platform development now
but change Host to Ubuntu 12.04 with Sun-Java6-JDK (1.6.0_32).

the Host default use GCC 4.6.x compiler, not GCC 4.4.x, so need to patch some files to fix build error

1. The patch fixed “failure while building obbtool"

diff –git a/core/combo/HOST_linux-x86.mk b/core/combo/HOST_linux-x86.mk
index 5ae4972..7df2893 100644
— a/core/combo/HOST_linux-x86.mk
+++ b/core/combo/HOST_linux-x86.mk
@@ -53,6 +53,6 @@ HOST_GLOBAL_CFLAGS += \
-include $(call select-android-config-h,linux-x86)

# Disable new longjmp in glibc 2.11 and later. See bug 2967937.
-HOST_GLOBAL_CFLAGS += -D_FORTIFY_SOURCE=0
+HOST_GLOBAL_CFLAGS += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0

HOST_NO_UNDEFINED_LDFLAGS := -Wl,–no-undefined

2. the patch fixed “failure external/gtest/src/../include/gtest/internal/gtest-param-util.h:122:11: error: ‘ptrdiff_t’ does not name a type"

diff –git a/include/gtest/internal/gtest-param-util.h b/include/gtest/internal/
index 5559ab4..1c1d119 100644
— a/include/gtest/internal/gtest-param-util.h
+++ b/include/gtest/internal/gtest-param-util.h
@@ -34,6 +34,7 @@
#ifndef GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_
#define GTEST_INCLUDE_GTEST_INTERNAL_GTEST_PARAM_UTIL_H_

+#include <cstddef>
#include <iterator>
#include <utility>
#include <vector>

3. the patch fixed “failure /external/llvm/lib/Support/Mutex.cpp:143: undefined reference to `pthread_mutex_trylock’
collect2: ld returned 1 exit status"

diff –git a/llvm-host-build.mk b/llvm-host-build.mk
index 5219efd..6f8f44d 100644
— a/llvm-host-build.mk
+++ b/llvm-host-build.mk
@@ -59,3 +59,5 @@ $(hide) $(TBLGEN) \
-gen-$(strip $(1)) \
-o $@ $<
endef
+
+LOCAL_LDLIBS := -lpthread -ldl

4. the patch fixed “failure with: make: *** [out/host/linux-x86/obj/STATIC_LIBRARIES/libMesa_intermediates/src/glsl/linker.o] Error 1″

diff –git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index f8b6962..683b446 100644
— a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -64,6 +64,7 @@
* \author Ian Romanick <ian.d.romanick@intel.com>
*/
#include <cstdlib>
+#include <cstddef>
#include <cstdio>
#include <cstdarg>
#include <climits>

5. the patch fixed “failure external/oprofile/libpp/format_output.h:94:22: error: reference ‘counts’ cannot be declared ‘mutable’ [-fpermissive]"

diff –git a/libpp/format_output.h b/libpp/format_output.h
index b6c4592..8e527d5 100644
— a/libpp/format_output.h
+++ b/libpp/format_output.h
@@ -91,7 +91,7 @@ protected:
symbol_entry const & symbol;
sample_entry const & sample;
size_t pclass;
– mutable counts_t & counts;
+ counts_t & counts;
extra_images const & extra;
double diff;
};

6.the patch workaround “frameworks/compile/slang/slang_rs_export_foreach.cpp:247:23: error: variable ‘ParamName’ set but not used [-Werror=unused-but-set-variable]"

diff –git a/Android.mk b/Android.mk
index a783ba9..75bd55e 100644
— a/Android.mk
+++ b/Android.mk
@@ -19,7 +19,7 @@ ifeq ($(TARGET_BUILD_APPS),)

LOCAL_PATH := $(call my-dir)

-local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter -Werror
+local_cflags_for_slang := -Wno-sign-promo -Wall -Wno-unused-parameter
ifneq ($(TARGET_BUILD_VARIANT),eng)
local_cflags_for_slang += -D__DISABLE_ASSERTS
endif

廣告

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s

%d 位部落客按了讚: