Build GingerBread on 32 bit machine.

I tried and it works http://forum.xda-developers.com/showpost.php?p=9998281&postcount=12

 

 

 

A quick and brutal fix is to:
1) go to gingerbread/prebuilt/linux-x86/toolchain
2) rename arm-eabi-4.4.3 to arm-eabi-4.4.3.old
3) link arm-eabi-4.4.0 to arm-eabi-4.4.3

Code:
cd gingerbread/prebuilt/linux-x86/toolchain
mv arm-eabi-4.4.3 to arm-eabi-4.4.3.old
ln -s arm-eabi-4.4.0  arm-eabi-4.4.3

One more fix needed to build on x86 is to change

Code:
# This forces a 64-bit build for Java6
LOCAL_CFLAGS += -m64
LOCAL_LDFLAGS += -m64

in the Android.mk files of the gingerbread/external/clearsilver/ directory
and subdirectories to:

Code:
# This forces a 64-bit build for Java6
LOCAL_CFLAGS += -m32
LOCAL_LDFLAGS += -m32

This should be fixed in a more elegant way based on the host arch.

Started to compile now....................................Done.
Works so far.

Patch attached to fix build on 32 bit hosts.

Code:
repo diff

project build/
diff --git a/core/main.mk b/core/main.mk
index 6113e52..72e32c8 100644
--- a/core/main.mk
+++ b/core/main.mk
@@ -72,7 +72,8 @@ $(info Checking build tools versions...)

 ifeq ($(BUILD_OS),linux)
 build_arch := $(shell uname -m)
-ifneq (64,$(findstring 64,$(build_arch)))
+#ifneq (64,$(findstring 64,$(build_arch)))
+ifneq (i686,$(findstring i686,$(build_arch)))
 $(warning ************************************************************)
 $(warning You are attempting to build on a 32-bit system.)
 $(warning Only 64-bit build environments are supported beyond froyo/2.2.)

project external/clearsilver/
diff --git a/cgi/Android.mk b/cgi/Android.mk
index 21c534b..2c7bf36 100644
--- a/cgi/Android.mk
+++ b/cgi/Android.mk
@@ -13,8 +13,12 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
 LOCAL_CFLAGS := -fPIC

 # This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64
+
+# This forces a 64-bit build for Java6
+LOCAL_CFLAGS += -m32
+LOCAL_LDFLAGS += -m32

 LOCAL_NO_DEFAULT_COMPILER_FLAGS := true

diff --git a/cs/Android.mk b/cs/Android.mk
index 9f0e30a..4807b3f 100644
--- a/cs/Android.mk
+++ b/cs/Android.mk
@@ -9,8 +9,10 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
 LOCAL_CFLAGS := -fPIC

 # This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64
+LOCAL_CFLAGS += -m32
+LOCAL_LDFLAGS += -m32

 LOCAL_NO_DEFAULT_COMPILER_FLAGS := true

diff --git a/java-jni/Android.mk b/java-jni/Android.mk
index 21b4fd1..cc6d3ce 100644
--- a/java-jni/Android.mk
+++ b/java-jni/Android.mk
@@ -34,8 +34,10 @@ LOCAL_C_INCLUDES := /
 LOCAL_CFLAGS += -fPIC

 # This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64
+LOCAL_CFLAGS += -m32
+LOCAL_LDFLAGS += -m32

 LOCAL_NO_DEFAULT_COMPILER_FLAGS := true

diff --git a/util/Android.mk b/util/Android.mk
index 386f379..fc27bbf 100644
--- a/util/Android.mk
+++ b/util/Android.mk
@@ -18,8 +18,12 @@ LOCAL_C_INCLUDES := $(LOCAL_PATH)/..
 LOCAL_CFLAGS := -fPIC

 # This forces a 64-bit build for Java6
-LOCAL_CFLAGS += -m64
-LOCAL_LDFLAGS += -m64
+#LOCAL_CFLAGS += -m64
+#LOCAL_LDFLAGS += -m64
+
+# This forces a 64-bit build for Java6
+LOCAL_CFLAGS += -m32
+LOCAL_LDFLAGS += -m32

 LOCAL_NO_DEFAULT_COMPILER_FLAGS := true
 
 
 
 
 
 
另外还需要修改 rename 
opensles/libopensles/IAndroidEffect.c => opensles/libopensles/IAndroidEffect.cpp
diff --git a/opensles/libopensles/Android.mk b/opensles/libopensles/ 
Android.mk 
index 64e9b6f..f965d3e 100644 
--- a/opensles/libopensles/Android.mk 
+++ b/opensles/libopensles/Android.mk 
@@ -56,7 +56,7 @@ LOCAL_SRC_FILES:=                     / 
         CEngine.c                     / 
         COutputMix.c                  / 
         IAndroidConfiguration.c       / 
-        IAndroidEffect.c              / 
+        IAndroidEffect.cpp            / 
         IAndroidEffectCapabilities.c  / 
         IAndroidEffectSend.c          / 
         IBassBoost.c   
 
 
 
 
 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值